It should be possible to do it like this:

SELECT Â Â Â c.make, c.model, count(c.carid) - count(x.resid) available_cars

FROM Â Â Â Â Â cars c

LEFT JOIN (

Â Â Â SELECT Â Â r.carid, r.resid

Â Â Â FROM Â Â Â Â reservations r

Â Â Â WHERE Â Â Â ? BETWEEN r.startdate AND r.enddate) x ON x.carid = c.carid

WHERE Â Â Â Â c.deleted = 'no'

GROUP BY Â c.make, c.model

ORDER BY Â c.make, c.model

The inner subquery will select only those reservations with start time before and end time after the given time (indicated by ?). The outer query then selects all the cars and tries to find a reservation that belongs to each car (there can be one or none, but never more than one, because I guess you can't have several reservations for the same car at the same time). Finally the resultset is grouped by make and model and for each the number of cars in total and the number of reservations is calculated and the difference is the number of available cars.

This approach makes use of the fact that COUNT() does only count values that are not NULL.