What is the best way to go about left joining a table that has specific where conditions that must be met, but at the same time may also be null ?
Example:
Select a.*, b.schedule
from Tablea a
left join Tableb b on a.subid = b.subid
WHERE
b.date > NOW()
and b.active = 1
It is possible that table B is empty, but if it is not empty then only active future schedules should show up.