idiom to treat empty result set as zero
I think you want coalesce outside the subquery expression.

SELECT 1000 &lt; coalesce((SELECT numOfItems FROM inventory ORDER BY inventoryDate DESC LIMIT 1), 0);