Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6d9e537

Browse files
committed
Adding Solution for 2362
1 parent 78c6e84 commit 6d9e537

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SELECT pc.product_id,pc.quantity,pc.quantity*pd.price AS price
2+
FROM purchases_2362 pc
3+
INNER JOIN products_2362 pd ON pc.product_id = pd.product_id
4+
WHERE invoice_id = (SELECT pc.invoice_id
5+
FROM purchases_2362 pc
6+
INNER JOIN products_2362 pd ON pc.product_id = pd.product_id
7+
GROUP BY pc.invoice_id
8+
ORDER BY SUM(quantity*price) DESC,pc.invoice_id ASC
9+
LIMIT 1);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /