SQL Question

From: <xdba_at_my-deja.com>
Date: Thu, 02 Nov 2000 12:21:21 GMT
Message-ID: <8trm7t$t7o$1_at_nnrp1.deja.com>


Given an employees table like this,
how could I query the top three salaried people per department in SQL?

Dept Name Salary
1 Smith 1000
1 Jones 2000
1 White 1000
1 Black 3000
1 Red 1000
1 Blue 1000
1 Smith 5000
2 Apple 1000
2 Pear 3000
2 Peach 1000
2 Lemon 4000
2 Melon 2000
2 Peach 3000
2 Prune 1000
etc.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 02 2000 - 13:21:21 CET

Original text of this message