ixxalnxxi
06-12-2008, 07:48 PM
the following query works except when the UserComments contains no rows with the StationID. any idea how to return just the Station info in that case?
SELECT s.*, AVG(uc.Rating) AS Rating
FROM Stations s, UserComments uc
WHERE s.StationID = 4
AND s.StationID = uc.StationID
GROUP BY uc.StationID
SELECT s.*, AVG(uc.Rating) AS Rating
FROM Stations s, UserComments uc
WHERE s.StationID = 4
AND s.StationID = uc.StationID
GROUP BY uc.StationID