Sobes.tech
Middle
2

Table Customers: customer_id (INT), customer_name (VARCHAR), country (VARCHAR), signup_date (DATE) Table Orders: order_id (INT), customer_id (INT), order_date (DATE), order_amount (DECIMAL), status (VARCHAR) Task: Write a query to find the total order amount and the total count of orders for each customer from the 'USA' who has spent a total of more than 500 on 'Completed' orders. Sort the results by total order amount in descending order. Expected Output: customer_name (VARCHAR), total_spent (DECIMAL), total_orders (INT)

Companies where asked
Virtusa