How can I return the top 10 rows for each category?
Say I have a table named xyz. It has a column called state, in the political unit sense of the word.
I want the top 10 rows from each state. Do I use case so that one can see from which state the row is?
I am using SQL Server 2012.
The top 10 would be from FCFS, the order in which they are entered.
Columns are
FirstName, LastName, Address, city, state, zip, phone etc.
For example, I have rows in my table from states AL, CT, NY etc. I want the top 10 rows based on FCFS from each state.