I have been working on a query but I am not getting the expected results.
Select * from(Arg,
F_Label AS Q1_F_Label,
Date from [dbo].[vw_F2_2] WHERE B_Label in ('XYZ','IJK') and Date >'2015-12-1' ) Q1
(SELECT F_Label AS Q2_F_Label, AVG(Arg) AS Mean, STDEV(Arg) AS Std_Dev
FROM [dbo].[vw_F2_2] where B_Label in ('XYZ','IJK') and Date >'2015-12-1' GROUP BY F_Label) Q2
ON Q1.Q1_F_Label = Q2.Q2_F_Label .
For example I have 100 C_Labels
I am getting the AVG(Arg) and STDEV(Arg) for all the 100 C_Labels.
I want to get the AVG (Arg) and STDEV(Arg) for each week , like below
Week 1 Mean Week 2 Mean Week 3 Mean
but with my query I am getting the average and stdev for all three weeks combined.