kaostika

SQL Join and COUNT function

Discussion created by kaostika on Oct 18, 2013
Latest reply on Oct 22, 2013 by kaostika

SELECT P.pname , s.id_Publication , COUNT ( s.id_Publication ) as NUM

FROM SchedLineItems AS s

JOIN Publications AS P

ON P.id = s.id_Publication

GROUP BY s.id_Publication

ORDER BY NUM DESC

 

Hi, I am having this problems with this SQL. The Syntax is correct but it seems I can pull in the Name field from the other table

 

Oreste

Outcomes