Here is what I want to do:
SELECT (SELECT SUM(reservedquantity) FROM reserved WHERE projectid=\'A\' GROUP BY referenceid) - (SELECT SUM(reservedquantity) FROM