Skip to content

Commit 2da5090

Browse files
Time: 1838 ms (17.48%), Space: 0B (100.00%) - LeetHub
1 parent 6888554 commit 2da5090

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
select Prices.product_id, round(sum(UnitsSold.units*Prices.price)/ sum(UnitsSold.units), 2) as average_price from Prices left join UnitsSold on Prices.product_id = UnitsSold.product_id and UnitsSold.purchase_date between Prices.start_date and Prices.end_date
2+
group by Prices.product_id
3+
order by Prices.product_id asc;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy