I asked this question before:
How do I bring back an entire range of dates in SQL between two dates, even when there is no data?
but I now need to only select incidents that have a Status of “E” for emergency.
I can’t put WHERE status=’E’ though, because that will stop it returning an entry for every single date.
How can I solve this?
Just add it to the
LEFT OUTER JOIN ... ON, since this is a contition for the joined rows as far as I understand the question.Something like this: