To calculate the weekly moving average of sales by location: The query must group by store_id (partitioning the calculation by each store). The ORDER BY date ensures the sales are evaluated chronologically. The ROWS BETWEEN 6 PRECEDING AND CURRENT ROW specifies a rolling window of 7 rows (1 week if each row represents daily data). The AVG(total_sales) computes the average sales over the defined rolling window. Chosen query meets these requirements: PARTITION BY store_id groups the calculation by each store. https://kxbjsyuhceggsyvxdkof.supabase.co/storage/v1/object/public/file-images/GOOGLE_Cloud_Associate-Data-Practitioner_/page_6_img_1.jpg ORDER BY date orders the rows correctly for the rolling average. https://kxbjsyuhceggsyvxdkof.supabase.co/storage/v1/object/public/file-images/GOOGLE_Cloud_Associate-Data-Practitioner_/page_6_img_2.jpg ROWS BETWEEN 6 PRECEDING AND CURRENT ROW ensures the 7-day moving average. https://kxbjsyuhceggsyvxdkof.supabase.co/storage/v1/object/public/file-images/GOOGLE_Cloud_Associate-Data-Practitioner_/page_6_img_3.jpg Extract from Google Documentation: From "Analytic Functions in BigQuery" (https://cloud.google.com/bigquery/docs/reference/standard-sql/analytic-function-concepts): "Use ROWS BETWEEN n PRECEDING AND CURRENT ROW with ORDER BY a time column to compute moving averages over a fixed number of rows, such as a 7-day window, partitioned by a grouping key like store_id." Reference: Google Cloud Documentation - "BigQuery Window Functions" (https://cloud.google.com/bigquery/docs/reference/standard-sql/window-function-calls).