Back to problems

SQL Query for Data Processing

SQL · Meta · Easy

Write a SQL query that retrieves customer names from the sales table when they made a sale exceeding 1000 during 2021. The table has this schema: sales (id, customer_name, amount, sale_date). Requirements: Return the customer_name values for rows satisfying both conditions. Each customer should appear at most once in the result. When no sales qualify, the query should produce an empty result list. Example: Suppose the sales table contains these rows: id customer_name amount…

Checking your access…