QUOTE(ohiggins @ 4 Oct, 2008 - 05:32 PM)

Hi I am currently doing an assignment using SQL and have gotten quite stuck. If anybody can help me with my query I would appreciate it...
The schema of the research DB is as follows:
Department(DeptNum, Descrip, Instname, DeptName, State, Postcode)
Academic(AcNum, *DeptNum, FamName, GiveName, Initials, Title)
Paper(PaNum, Title)
Author(*PaNum, *AcNum)
Field(FieldNum, ID, Title)
Interest(*FieldNum, *AcNum, Descrip)
Hi, I'm doing the same assignment! With respect to the schema, I have to "list the paper numbers with the largest number of co-authors." I have constructed a query that "almost" does the job, as in it displays the paper numbers with the most number of authors first, and other papers as well in a descending order. After spending about three days straight on this assignment, I am unable to think straight. I'm not even sure if what I'm typing right now is proper English or not! So, onto the query I constructed:
CODE
SELECT DISTINCT PaNum, Title, COUNT(AcNum)
FROM Author NATURAL JOIN Paper
GROUP BY PaNum
ORDER BY COUNT(AcNum) DESC;
This query lists papers with maximum number of authors first, in descending order. I know I'm close to getting what I need, but I'm unable to think any further. Someone help me before my head blows off! :-S