I'm finding it difficult to grasp why this following query wouldn't work:
SELECT rating_count
FROM
(SELECT
title,
COUNT(rating) AS rating_count
FROM series
LEFT JOIN reviews ON series.id = reviews.series_id
GROUP BY series.id);
The result of the subquery is the following:
Why is it that when I try to query for the rating_count, it wouldn't work? I thought I could request this. My intention is filter those rows that have rating_count = 0.
I wanted to try:
SELECT *
FROM
(SELECT
title, COUNT(rating) AS rating_count
FROM series
LEFT JOIN reviews ON series.id = reviews.series_id
GROUP BY series.id)
WHERE rating_count = 0;
