JOIN Help
Hello, I have this statement:
--------------------
SELECT
el.EventNo,el.Event,el.EState,el.ECity,el.Starts,COUNT(fr.fa_id) AS TotalFAs
FROM `event_listings` el
LEFT JOIN `fastaudit_reviews` fr ON el.EventNo = fr.fa_eventid
WHERE el.Starts >= '2018-11-01' AND ( el.Ends <= '2018-11-30' || el.Ends IS NULL )
ORDER BY el.Starts DESC
--------------------
Results that I'm getting are limited to ONLY those rows in the fastaudit_reviews (fr.fa_eventid) that equal 'el.EventNo'.
(Most fr.fa_eventid have a default of 0)
What I want to list *ALL* the rows of the WHERE condition (at all times).. but I'm Joining fastaudit_reviews to try and count how many reviews each event has.
Any pointers as to what I'm doing wrong are much appreciated!
Donovan
Subject
Written By
Posted
JOIN Help
June 04, 2019 01:41PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.