Table: Software
SoftwareID
SoftwareName
Version
ProductKey
Alright what I am doing is figuring out the total number of installations of software in the business, and the total number of licenses. I figured out how to do that with this:
SELECT Count(Software.ProductKey) AS [Total Installations], (SELECT Count(*)
FROM (SELECT DISTINCT Software.ProductKey FROM Software WHERE Software.Version='2000' AND Software.SoftwareName='Microsoft Office'
GROUP BY Software.ProductKey) AS temp1) AS [Unique Product Keys]
FROM Software
WHERE (((Software.Version)='2000') AND ((Software.SoftwareName)='Microsoft Office'));
That returns the correct numbers. But I would like another query that returns two columns like the one above: Total Installations and Unique Product Keys. However instead of doing a COUNT I would like to list all of the product keys. So far I haven't been able to figure it out.
SoftwareID
SoftwareName
Version
ProductKey
Alright what I am doing is figuring out the total number of installations of software in the business, and the total number of licenses. I figured out how to do that with this:
SELECT Count(Software.ProductKey) AS [Total Installations], (SELECT Count(*)
FROM (SELECT DISTINCT Software.ProductKey FROM Software WHERE Software.Version='2000' AND Software.SoftwareName='Microsoft Office'
GROUP BY Software.ProductKey) AS temp1) AS [Unique Product Keys]
FROM Software
WHERE (((Software.Version)='2000') AND ((Software.SoftwareName)='Microsoft Office'));
That returns the correct numbers. But I would like another query that returns two columns like the one above: Total Installations and Unique Product Keys. However instead of doing a COUNT I would like to list all of the product keys. So far I haven't been able to figure it out.