Complete the SQL query to select all columns from the table named 'Orders'.
SELECT [1] FROM Orders;The asterisk (*) is used in SQL to select all columns from a table.
Complete the SQL query to find orders where the quantity is greater than 10.
SELECT * FROM Orders WHERE quantity [1] 10;
The '>' operator is used to find values greater than a specified number.
Fix the error in the SQL query to select distinct customer IDs from Orders.
SELECT [1] customer_id FROM Orders;The keyword 'DISTINCT' is used in SQL to return unique values.
Fill both blanks to create a SQL query that groups orders by customer_id and counts the number of orders.
SELECT customer_id, COUNT([1]) AS order_count FROM Orders GROUP BY [2];
COUNT(*) counts all rows. GROUP BY customer_id groups the results by each customer.
Fill all three blanks to write a SQL query that selects product_id, sums quantity sold, and groups by product_id having total quantity greater than 100.
SELECT [1], SUM([2]) AS total_quantity FROM Sales GROUP BY [3] HAVING total_quantity > 100;
Select product_id, sum the quantity sold, group by product_id to aggregate, and filter groups with total quantity over 100.