Professional Documents
Culture Documents
Let’s say you have two SQL tables: Customers and Orders.
The Customers dataset has 100k+ rows. Here’s a small sample, the first six rows:
Customer_number Customer_name
1 Nguyen Van A
2 Company B
3 LE Van C
4 Company D
5 Company E
6 Tran Thi P
The Orders dataset has 20M+ rows. Here’s a small sample, the first 8 rows:
Create an SQL query that shows the TOP 3 Customers who bought the most goods in total!
For example:
*Please use any programming language that you prefer. You can use procedures or functions if your
preferred language does not support OOP.