Thanks for replying
OK we have several tables for our assignment and for this particular question we are asked Q. Among the academics who have no papers, who has the greatest number of interests.. I used the * just return all attributes to start with. When I use SELECT * , count( Au.AcNum ) AS num, count( i.AcNum ) AS num2 FROM academic a LEFT OUTER JOIN author Au ON a.AcNum = Au.AcNum LEFT OUTER JOIN interest i ON i.AcNUm = a.AcNum GROUP BY A.AcNum HAVING num =0 This gives me the academics with 0, that part seems to be working OK, I am struggling on how to count the second part of the question.. Database looks like 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) -- View this message in context: http://www.nabble.com/Subqueries-tp24587437p24588040.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users