Im looking to get all the Windows versions, Product key and how many there are in a total column.
Select Distinct Top 1000000 (tblSerialnumber.ProductKey),
Count(tblSerialnumber.Computername) As Total, tblSerialnumber.Product
From tblSerialnumber
Where tblSerialnumber.Product Like '%Window%'
I get a Column 'tblSerialnumber.ProductKey' is invalid in the selected list beacuse it is not contained in either an aggregate function of the Group By clause.
I have tried many different attempts. Please help!