How do I count two columns in the same table and then calculate average, using MS SQL Server?
"Approximate" syntax below, to show what I mean:
Select company, products as [average number of products]
Count products in first column.
Count Distinct companies in second column.
Average: total products/total Distinct companies
(which is average number of products for each distinct company).
I think I have to use Count and not Avg, but how do I combine this
for two columns (same table)?