I'm trying to create a query that will pull the first 10 records of each id in a table.
Something like this sounds:
select distinct top 2 id, column1 from table group by id, column1
ID Column1
1 ab
1 ac
1 ad
2 df
2 gf
2 dfdf
2 hgf
3 wa
3 hgh
3 dfgg
4 fgfgg
So the above table would return the first two results for each ID like this:
ID Column1
1 ab
1 ac
2 df
2 gf
3 wa
3 hgh
4 fgfgg