var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: count records in a top 10 query
Im trying to make a top 10 list of col1 and and at the 11:th place it should show a number of record that dosent make it to the top 10 list...
i have this so far, and it dosent give me anything...
col1 is varchar 254
SELECT COL1, COUNT(*) AS number
WHERE (NOT EXISTS
(SELECT TOP 10 COL1
GROUP BY COL1
ORDER BY COUNT(*) DESC)
ex of output
a query that only gives me the place11 number is enough
thx in advance //Mr
Last edited by mrpcguy; 12-05-05 at 17:11.
Here is the number of records that are not in the top 10 list
select count(*) number
where col1 not in
(select top 10 col1 from myTable)
group by col1
order by count(*) desc