Problem Statement
Write a query to find the customer who has spent the most money (sum of `total_amount`) in each country. Return the customer's `country`, customer `name`, and their `total_spent`. Sort by `total_spent` descending.
Skills Evaluated
Window FunctionsROW_NUMBER OVERCTEGROUP BY
Write your SQL query in the editor on the right and click **Run Query**. The system runs your query and compares the result dataset with the official solution. Results must match row-for-row, column-for-column.
Expected Output Format
Executing expected result set...SQL Query WorkspaceSQLite v3.45 (WASM Mode)
QUICK INSERT:
1