79379108

Date: 2025-01-22 20:24:34
Score: 1
Natty:
Report link

Assuming fruit has an id column, you need:

select sum(p.numberPurchased * f.price)
from fruit f
join purchase p on f.id = p.fruitId;

You can omit prefixes (p., f.) if the field names do not repeat.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user20488960