Quick and dirty method;
SELECT TOP 10 * FROM
(SELECT ListSheetId, Part, COUNT(*) as RCount FROM Post GROUP BY ListSheetId, Part) AS MyTable
ORDER BY RCount DESC
Assume the following data
ListSheetId, Part
12, Wheel
10, Axle
1, Seat
12, Wheel
10, Axle
1, Seat
1, Seat
1, Seat
10, Axle
1, Seat
1, Seat
12, Wheel
12, Wheel
12, Wheel
1, Seat
1, Seat
1, Seat
1, Seat
1, Seat
How this works.
The Inner Query retrieves a list of ListSheetId, Part & a count of the number of Sheets & Parts
Result Set:
ListSheetId, Part, Count
12, Wheel, 5
10, Axle, 3
1, Seat, 11
The outer query retrieves the top 10 results after ordering the inner query by the Count column. If the above query was changed to SELECT TOP 2 then the result set would be;
ListSheetId, Part, Count
1, Seat, 11
12, Wheel, 5
Additional information;
GROUP BY creates distinct lists, assume the following data;
ListSheetId, Part, Count
12, Wheel, 5
10, Axle, 3
1, Seat, 11
12, Axle, 8
10, Seat, 4
If the above query was changed to SELECT TOP 4 then the result set would be;
ListSheetId, Part, Count
1, Seat, 11
12, Axle, 8
12, Wheel, 5
10, Seat, 4
This is because GROUP BY identifies the distinct values across all columns in the group by clause - NOTE: Count is not included as it is an aggregate method and is not included in the Group By clause.
Therefore 1 & Seat, 12 & Axle, 12 & Wheel & 10 & Seat are the first 4 distinct values after applying the Sort method
If this is not what you need please improve your question by adding example data & result sets
Kind Regards