how would it be possible to check if a certain value in salesman_id is null, and if it is, assign it to something else (in this case, 0)?
here's what i've wrote up so far:
SELECT O.SALESMAN_ID, SUM(OI.UNIT_PRICE * QUANTITY)
FROM ORDERS O, ORDER_ITEMS OI
GROUP BY O.SALESMAN_ID
ORDER BY O.SALESMAN_ID;
case when salesman_id is null then 0 else salesman_id end2.coalesce(salesman_id, 0)And Oracle specific: 3.nvl(salesman_id, 0)4.decode(salesman_id, null, 0, salesman_id)