Complete the code to select all columns from the table named 'sales_data'.
SELECT [1] FROM `project.dataset.sales_data`;In BigQuery SQL, * selects all columns from the table.
Complete the code to filter rows where the 'amount' column is greater than 100.
SELECT * FROM `project.dataset.sales_data` WHERE amount [1] 100;
The '>' operator filters rows where 'amount' is greater than 100.
Fix the error in the code to calculate the total sales by summing the 'amount' column.
SELECT SUM([1]) AS total_sales FROM `project.dataset.sales_data`;The column to sum is 'amount' to get total sales.
Fill both blanks to create a query that groups sales by 'region' and counts the number of sales.
SELECT [1], COUNT(*) AS sales_count FROM `project.dataset.sales_data` GROUP BY [2];
Grouping and selecting by 'region' allows counting sales per region.
Fill all three blanks to write a query that selects 'customer_id', sums 'amount' as 'total_spent', and filters customers who spent more than 500.
SELECT [1], SUM([2]) AS total_spent FROM `project.dataset.sales_data` GROUP BY [3] HAVING total_spent > 500;
Select and group by 'customer_id', sum the 'amount' column, then filter with HAVING.