I need to put all of this in only one query.
It need to be put in a Group By Beam .
Here is my SQL for now
SELECT [DT_Analysis_Results_Table].[Beam] AS Beam, 'All' AS Location, 'All' AS Channel, Avg([DT_Analysis_Results_Table].[Pk-Pk_deviation(dB)]) AS [Mean of Pk-Pk Deviation], StDev([DT_Analysis_Results_Table].[Pk-Pk_deviation(dB)]) AS [Standard Deviation of Pk-Pk Deviation], Count(*) AS NbrAcquisition FROM (SELECT DISTINCT [Product_ID] FROM [Report_filter_temp]) GROUP BY DT_Analysis_Results_Table.[Beam]
The problem is i want the count of different Product_ID and the Stdev and the average of PK-PK_deviation(dB) of all of the records.
Btw the code is not right, im only getting one record while i'm suppos to have 222. I've put it this way so you guys can understand.
I think there's a way to do this in one Query with the JOIN or UNION operator (in one i can do a normal Select while in the other one i can do a select Distinct)
This post has been edited by modi123_1: 06 June 2012 - 08:31 AM
Reason for edit:: dropped 'challenge' from title..