यह काम करना चाहिए:
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
यह काम करना चाहिए:
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