Pando,
If you are using 8.1.6 or above you can take advantage of analytycal functins. In your case you would use new ROW_NUMBER() function:
SELECT column_a, column_b FROM your_table
WHERE (ROW_NUMBER() OVER (PARTITION BY column_a)) <= 3;
HTH,
|
Results 1 to 10 of 31
Thread: tricky SQL?Threaded View
|
Click Here to Expand Forum to Full Width |