In a query, how do I do a count of the number of lines that appear in the query? Not the number of records, because the query itself is grouped. The results are in order, highest to lowest, and I want to see just the top 50.
here is an example or sequential numbering in a query
SELECT TOP 100 (select top 100 count(b.authors_name) as c
from MyTable2 b
where b.authors_name<=a.authors_name
) AS rowN, a.*
FROM MyTable2 AS a
ORDER BY a.authors_name;