Mělo by to fungovat:
SELECT si.code, SUM(si.quantity), SUM(si.quantity * pl.price) as cash
FROM sold_items si
INNER JOIN price_list pl ON pl.code = si.code AND pl.size = si.size
GROUP BY si.code
Mělo by to fungovat:
SELECT si.code, SUM(si.quantity), SUM(si.quantity * pl.price) as cash
FROM sold_items si
INNER JOIN price_list pl ON pl.code = si.code AND pl.size = si.size
GROUP BY si.code