Connecting Tech Pros Worldwide Help | Site Map

LIMIT on a condition

Newbie
 
Join Date: Dec 2008
Posts: 24
#1: Jul 26 '09
Hi all
I am trying to get info from a table in this form :

table_1
jobid(PK) projectid desc
------------------------------------------
1 1 whatever
2 1 .
3 1 .
4 2 .
5 2 .
. . .
. . .
. . .

What I am trying to get is a query which will give me only 5 rows per projectid. ( a LIMIT on the WHERE statement but not on the whole SELECT)
If I use LIMIT, I get a total of 5 results.

Thanks in advance
nsteiner
Reply