Used as less Jargons as possible 🐻‍❄️🐻‍❄️
Code\n\nselect p.product_id, coalesce(round(sum(price * units) / sum(units), 2), 0) as average_price \nfrom Prices p\nleft join UnitsSold u on p.product_id=u.pr
# Code\n```\nselect p.product_id, coalesce(round(sum(price * units) / sum(units), 2), 0) as average_price \nfrom Prices p\nleft join UnitsSold u on p.product_id=u.product_id\nand u.purchase_date between p.start_date and p.end_date\ngroup by p.product_id\n```
['Oracle']