First Query:
SELECT
d.id,
d.brand_name,
count(*) AS no_of_time_used
FROM content oc
LEFT JOIN drama d ON d.id = oc.drama_id
LEFT JOIN orders o ON o.id = oc.order_id
AND o.fundraiser_id IS NOT NULL
GROUP BY drama_id
ORDER BY no_of_time_used DESC;
Second Query:
SELECT
d.id,
d.brand_name,
count(*) AS no_of_time_used
FROM content oc
LEFT JOIN drama d ON d.id = oc.drama_id
LEFT JOIN orders o ON o.id = oc.order_id
WHERE o.fundraiser_id IS NOT NULL
GROUP BY drama_id
ORDER BY no_of_time_used DESC;
There is only one difference in these queries that's AND vs WHERE. In First Query, I have used AND just after the second JOIN Statement whereas in the second query I have used WHERE in place of AND.
Edit: Both Queries are returning different result.