Prompt: You are given transactions.csv (columns txn_id, date [YYYY-MM-DD], amount). Report the total amount for transactions dated between 2026-02-10 and 2026-04-20 INCLUSIVE of both endpoints, as a single JSON number rounded to 2 decimals.


Prompt: You are given transactions.csv (columns txn_id, date [YYYY-MM-DD], amount). Report the total amount for transactions dated between 2026-01-01 and 2026-03-31 INCLUSIVE of both endpoints, as a single JSON number rounded to 2 decimals.


Prompt: You are given transactions.csv (columns txn_id, date [YYYY-MM-DD], amount). Report the total amount for transactions dated between 2026-03-01 and 2026-03-31 INCLUSIVE of both endpoints, as a single JSON number rounded to 2 decimals.


Prompt: You are given transactions.csv (columns txn_id, date [YYYY-MM-DD], amount). Report the total amount for transactions dated between 2026-05-01 and 2026-06-15 INCLUSIVE of both endpoints, as a single JSON number rounded to 2 decimals.


Prompt: You are given payments.csv (columns payment_id, customer, amount, note). Gateway retries appear as rows with the SAME payment_id and amount but a different note. Treat a payment_id as a duplicate (keep it once), then report the total amount as a single JSON number rounded to 2 decimals.


Prompt: You are given payments.csv (columns payment_id, customer, amount, note). Gateway retries appear as rows with the SAME payment_id and amount but a different note. Treat a payment_id as a duplicate (keep it once), then report the total amount as a single JSON number rounded to 2 decimals.


Prompt: You are given payments.csv (columns payment_id, customer, amount, note). Gateway retries appear as rows with the SAME payment_id and amount but a different note. Treat a payment_id as a duplicate (keep it once), then report the total amount as a single JSON number rounded to 2 decimals.


Prompt: You are given payments.csv (columns payment_id, customer, amount, note). Gateway retries appear as rows with the SAME payment_id and amount but a different note. Treat a payment_id as a duplicate (keep it once), then report the total amount as a single JSON number rounded to 2 decimals.


Prompt: You are given invoices.csv (columns invoice_id, amount). Report the total amount across all invoices whose amount is greater than OR EQUAL TO 250.00 (inclusive), as a single JSON number rounded to 2 decimals.


Prompt: You are given invoices.csv (columns invoice_id, amount). Report the total amount across all invoices whose amount is greater than OR EQUAL TO 500.00 (inclusive), as a single JSON number rounded to 2 decimals.


Prompt: You are given invoices.csv (columns invoice_id, amount). Report the total amount across all invoices whose amount is greater than OR EQUAL TO 100.00 (inclusive), as a single JSON number rounded to 2 decimals.


Prompt: You are given invoices.csv (columns invoice_id, amount). Report the total amount across all invoices whose amount is greater than OR EQUAL TO 1000.00 (inclusive), as a single JSON number rounded to 2 decimals.


Prompt: You are given tickets.csv (columns ticket_id, team, priority). The export contains exact duplicate rows; deduplicate whole rows first, then report the number of distinct tickets per team as a JSON object mapping team to count.


Prompt: You are given tickets.csv (columns ticket_id, team, priority). The export contains exact duplicate rows; deduplicate whole rows first, then report the number of distinct tickets per team as a JSON object mapping team to count.


Prompt: You are given tickets.csv (columns ticket_id, team, priority). The export contains exact duplicate rows; deduplicate whole rows first, then report the number of distinct tickets per team as a JSON object mapping team to count.


Prompt: You are given tickets.csv (columns ticket_id, team, priority). The export contains exact duplicate rows; deduplicate whole rows first, then report the number of distinct tickets per team as a JSON object mapping team to count.


Prompt: You are given readings.csv (columns reading_id, site, temp_c). Some temp_c cells are blank (missing readings); EXCLUDE them from the average, do not treat them as 0. Report the mean temp_c per site as a JSON object mapping site to mean, rounded to 2 decimals.


Prompt: You are given readings.csv (columns reading_id, site, temp_c). Some temp_c cells are blank (missing readings); EXCLUDE them from the average, do not treat them as 0. Report the mean temp_c per site as a JSON object mapping site to mean, rounded to 2 decimals.


Prompt: You are given readings.csv (columns reading_id, site, temp_c). Some temp_c cells are blank (missing readings); EXCLUDE them from the average, do not treat them as 0. Report the mean temp_c per site as a JSON object mapping site to mean, rounded to 2 decimals.


Prompt: You are given readings.csv (columns reading_id, site, temp_c). Some temp_c cells are blank (missing readings); EXCLUDE them from the average, do not treat them as 0. Report the mean temp_c per site as a JSON object mapping site to mean, rounded to 2 decimals.


Prompt: You are given shipments.csv with columns shipment_id, warehouse, status, weight_kg. Some weight_kg values are negative data-entry errors: use their absolute value. Considering only rows whose status is exactly 'shipped' (case-sensitive), report the total weight_kg per warehouse as a JSON object mapping warehouse to total, rounded to 2 decimals.


Prompt: You are given output.csv with columns shipment_id, warehouse, status, weight_kg. Some weight_kg values are negative data-entry errors: use their absolute value. Considering only rows whose status is exactly 'shipped' (case-sensitive), report the total weight_kg per warehouse as a JSON object mapping warehouse to total, rounded to 2 decimals.


Prompt: You are given shipments.csv with columns shipment_id, warehouse, status, weight_kg. Some weight_kg values are negative data-entry errors: use their absolute value. Considering only rows whose status is exactly 'shipped' (case-sensitive), report the total weight_kg per warehouse as a JSON object mapping warehouse to total, rounded to 2 decimals.


Prompt: You are given loads.csv with columns shipment_id, warehouse, status, weight_kg. Some weight_kg values are negative data-entry errors: use their absolute value. Considering only rows whose status is exactly 'shipped' (case-sensitive), report the total weight_kg per warehouse as a JSON object mapping warehouse to total, rounded to 2 decimals.


Prompt: You are given customers.csv (customer_id, name, tier) and orders.csv (order_id, customer_id, amount). The customers table contains a duplicate record for one customer (a CRM double-entry). Resolve the target customer to a SINGLE customer_id, then report their total order amount as a single JSON number rounded to 2 decimals. Target customer name: Barbara.


Prompt: You are given customers.csv (customer_id, name, tier) and orders.csv (order_id, customer_id, amount). The customers table contains a duplicate record for one customer (a CRM double-entry). Resolve the target customer to a SINGLE customer_id, then report their total order amount as a single JSON number rounded to 2 decimals. Target customer name: Grace.


Prompt: You are given customers.csv (customer_id, name, tier) and orders.csv (order_id, customer_id, amount). The customers table contains a duplicate record for one customer (a CRM double-entry). Resolve the target customer to a SINGLE customer_id, then report their total order amount as a single JSON number rounded to 2 decimals. Target customer name: Radia.


Prompt: You are given customers.csv (customer_id, name, tier) and orders.csv (order_id, customer_id, amount). The customers table contains a duplicate record for one customer (a CRM double-entry). Resolve the target customer to a SINGLE customer_id, then report their total order amount as a single JSON number rounded to 2 decimals. Target customer name: Ada.


Prompt: You are given sales.csv (columns region, product, units). Build a pivot of total units by region x product and report the single cell for region='APAC', product='washer'. If that combination has no rows, the answer is 0 (not an error). Output a single JSON number.


Prompt: You are given sales.csv (columns region, product, units). Build a pivot of total units by region x product and report the single cell for region='LATAM', product='prem'. If that combination has no rows, the answer is 0 (not an error). Output a single JSON number.


Prompt: You are given sales.csv (columns region, product, units). Build a pivot of total units by region x product and report the single cell for region='W', product='bakery'. If that combination has no rows, the answer is 0 (not an error). Output a single JSON number.


Prompt: You are given sales.csv (columns region, product, units). Build a pivot of total units by region x product and report the single cell for region='dev', product='support'. If that combination has no rows, the answer is 0 (not an error). Output a single JSON number.


Prompt: You are given test_strings.json (a JSON list of sentences). Write a Python regex that extracts every order id of the exact form ORD- followed by EXACTLY four digits (no more, no fewer). Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of sentences). Write a Python regex that extracts every order id of the exact form ORD- followed by EXACTLY four digits (no more, no fewer). Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of sentences). Write a Python regex that extracts every order id of the exact form ORD- followed by EXACTLY four digits (no more, no fewer). Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of sentences). Write a Python regex that extracts every order id of the exact form ORD- followed by EXACTLY four digits (no more, no fewer). Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of log lines of the form 'DATE | user | LEVEL | message'). Write a Python regex with named groups date, user, level, message. NOTE: the message field may itself contain ' | ', so the message group must capture everything after the third delimiter. Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of log lines of the form 'DATE | user | LEVEL | message'). Write a Python regex with named groups date, user, level, message. NOTE: the message field may itself contain ' | ', so the message group must capture everything after the third delimiter. Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of log lines of the form 'DATE | user | LEVEL | message'). Write a Python regex with named groups date, user, level, message. NOTE: the message field may itself contain ' | ', so the message group must capture everything after the third delimiter. Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of log lines of the form 'DATE | user | LEVEL | message'). Write a Python regex with named groups date, user, level, message. NOTE: the message field may itself contain ' | ', so the message group must capture everything after the third delimiter. Output only the pattern string.


Prompt: You are given test_strings.json (a JSON list of objects with fields s and valid). Write a Python regex that, used with fullmatch, accepts exactly the valid product codes (two uppercase letters, dash, four digits, dash, one uppercase letter) and rejects the near-misses. Output only the pattern.


Prompt: You are given test_strings.json (a JSON list of objects with fields s and valid). Write a Python regex that, used with fullmatch, accepts exactly the valid product codes (two uppercase letters, dash, four digits, dash, one uppercase letter) and rejects the near-misses. Output only the pattern.


Prompt: You are given test_strings.json (a JSON list of objects with fields s and valid). Write a Python regex that, used with fullmatch, accepts exactly the valid product codes (two uppercase letters, dash, four digits, dash, one uppercase letter) and rejects the near-misses. Output only the pattern.


Prompt: You are given test_strings.json (a JSON list of objects with fields s and valid). Write a Python regex that, used with fullmatch, accepts exactly the valid product codes (two uppercase letters, dash, four digits, dash, one uppercase letter) and rejects the near-misses. Output only the pattern.


Prompt: The SQLite DB has an orders table (order_id, region, status, amount). Write a query returning the total amount per region for status = 'paid' ONLY (refunded rows must be excluded). Return columns (region, total).


Prompt: The SQLite DB has an orders table (order_id, region, status, amount). Write a query returning the total amount per region for status = 'paid' ONLY (refunded rows must be excluded). Return columns (region, total).


Prompt: The SQLite DB has an orders table (order_id, region, status, amount). Write a query returning the total amount per region for status = 'paid' ONLY (refunded rows must be excluded). Return columns (region, total).


Prompt: The SQLite DB has an orders table (order_id, region, status, amount). Write a query returning the total amount per region for status = 'paid' ONLY (refunded rows must be excluded). Return columns (region, total).


Prompt: The SQLite DB has customers (customer_id, name, country) and orders (order_id, customer_id, status, amount). Write a query returning the total paid amount per customer name, for customers in country = 'UK' and orders with status = 'paid' only.


Prompt: The SQLite DB has customers (customer_id, name, country) and orders (order_id, customer_id, status, amount). Write a query returning the total paid amount per customer name, for customers in country = 'US' and orders with status = 'paid' only.


Prompt: The SQLite DB has customers (customer_id, name, country) and orders (order_id, customer_id, status, amount). Write a query returning the total paid amount per customer name, for customers in country = 'JP' and orders with status = 'paid' only.


Prompt: The SQLite DB has customers (customer_id, name, country) and orders (order_id, customer_id, status, amount). Write a query returning the total paid amount per customer name, for customers in country = 'NL' and orders with status = 'paid' only.


Prompt: You are given sensors.csv (columns sensor_id, reading). Return the sorted JSON list of sensor_id strings whose reading is greater than OR EQUAL TO 85.0 (inclusive of the boundary).


Prompt: You are given sensors.csv (columns sensor_id, reading). Return the sorted JSON list of sensor_id strings whose reading is greater than OR EQUAL TO 70.0 (inclusive of the boundary).


Prompt: You are given sensors.csv (columns sensor_id, reading). Return the sorted JSON list of sensor_id strings whose reading is greater than OR EQUAL TO 100.0 (inclusive of the boundary).


Prompt: You are given sensors.csv (columns sensor_id, reading). Return the sorted JSON list of sensor_id strings whose reading is greater than OR EQUAL TO 60.0 (inclusive of the boundary).


Prompt: You are given players.csv (columns player_id, points, joined). Return the top 5 player_ids by points, highest first. Break ties by EARLIEST joined date. Output a JSON list of player_id strings in ranked order.


Prompt: You are given players.csv (columns player_id, points, joined). Return the top 3 player_ids by points, highest first. Break ties by EARLIEST joined date. Output a JSON list of player_id strings in ranked order.


Prompt: You are given players.csv (columns player_id, points, joined). Return the top 8 player_ids by points, highest first. Break ties by EARLIEST joined date. Output a JSON list of player_id strings in ranked order.


Prompt: You are given players.csv (columns player_id, points, joined). Return the top 4 player_ids by points, highest first. Break ties by EARLIEST joined date. Output a JSON list of player_id strings in ranked order.


Prompt: checkins.csv (member_id, month) records each month a member checked in at a gym, covering 8 months (2026-01 through 2026-08). Return a sorted JSON list of member_id strings for every member with an unbroken run of at least 3 consecutive months checked in.


Prompt: checkins.csv (member_id, month) records each month a member checked in at a coworking space, covering 8 months (2026-01 through 2026-08). Return a sorted JSON list of member_id strings for every member with an unbroken run of at least 3 consecutive months checked in.


Prompt: checkins.csv (member_id, month) records each month a patron checked in at a library, covering 8 months (2026-01 through 2026-08). Return a sorted JSON list of member_id strings for every member with an unbroken run of at least 3 consecutive months checked in.


Prompt: checkins.csv (member_id, month) records each month a member checked in at a climbing gym, covering 8 months (2026-01 through 2026-08). Return a sorted JSON list of member_id strings for every member with an unbroken run of at least 3 consecutive months checked in.


Prompt: campaign_events.csv (campaign_id, user_id, stage) records one row per user per funnel stage reached for each fintech campaign (stage is impression, click, or signup). Report, as a JSON object, each campaign's signup rate (distinct signup users / distinct click users), rounded to 4 decimals, for campaigns that have at least one click.


Prompt: campaign_events.csv (campaign_id, user_id, stage) records one row per user per funnel stage reached for each edtech campaign (stage is impression, click, or signup). Report, as a JSON object, each campaign's signup rate (distinct signup users / distinct click users), rounded to 4 decimals, for campaigns that have at least one click.


Prompt: campaign_events.csv (campaign_id, user_id, stage) records one row per user per funnel stage reached for each travel campaign (stage is impression, click, or signup). Report, as a JSON object, each campaign's signup rate (distinct signup users / distinct click users), rounded to 4 decimals, for campaigns that have at least one click.


Prompt: campaign_events.csv (campaign_id, user_id, stage) records one row per user per funnel stage reached for each insurance campaign (stage is impression, click, or signup). Report, as a JSON object, each campaign's signup rate (distinct signup users / distinct click users), rounded to 4 decimals, for campaigns that have at least one click.


Prompt: orders.csv (customer_id, order_date) records each order placed at a online boutique, order_date given as a 2026 month ('2026-01' style), covering months 2026-01 through 2026-06. Report, as a JSON object mapping month to count, the number of customers whose FIRST-EVER order falls in that month.


Prompt: orders.csv (customer_id, order_date) records each order placed at a meal-kit service, order_date given as a 2026 month ('2026-01' style), covering months 2026-01 through 2026-06. Report, as a JSON object mapping month to count, the number of customers whose FIRST-EVER order falls in that month.


Prompt: orders.csv (customer_id, order_date) records each order placed at a hardware store, order_date given as a 2026 month ('2026-01' style), covering months 2026-01 through 2026-06. Report, as a JSON object mapping month to count, the number of customers whose FIRST-EVER order falls in that month.


Prompt: orders.csv (customer_id, order_date) records each order placed at a pet supply shop, order_date given as a 2026 month ('2026-01' style), covering months 2026-01 through 2026-06. Report, as a JSON object mapping month to count, the number of customers whose FIRST-EVER order falls in that month.


Prompt: funnel_events.csv (user_id, step, event_date) records, for each user of a mobile banking app, one row per onboarding step they completed (steps, in order: signup, verified_email, completed_profile, first_action); a user only reaches a step if they completed every step before it. Write a SQL query returning (pair, dropoff) rows, one per adjacent step pair (pair formatted as '<step>-><next step>'), where dropoff is the number of users who completed that step but not the immediately following step.


Prompt: funnel_events.csv (user_id, step, event_date) records, for each user of a B2B software trial, one row per onboarding step they completed (steps, in order: trial_start, invited_teammate, connected_data, first_report); a user only reaches a step if they completed every step before it. Write a SQL query returning (pair, dropoff) rows, one per adjacent step pair (pair formatted as '<step>-><next step>'), where dropoff is the number of users who completed that step but not the immediately following step.


Prompt: funnel_events.csv (user_id, step, event_date) records, for each user of a dating app, one row per onboarding step they completed (steps, in order: signup, photo_uploaded, first_match); a user only reaches a step if they completed every step before it. Write a SQL query returning (pair, dropoff) rows, one per adjacent step pair (pair formatted as '<step>-><next step>'), where dropoff is the number of users who completed that step but not the immediately following step.


Prompt: funnel_events.csv (user_id, step, event_date) records, for each user of a food delivery app, one row per onboarding step they completed (steps, in order: signup, address_added, payment_added, first_order); a user only reaches a step if they completed every step before it. Write a SQL query returning (pair, dropoff) rows, one per adjacent step pair (pair formatted as '<step>-><next step>'), where dropoff is the number of users who completed that step but not the immediately following step.


Prompt: invoices.csv (vendor_id, invoice_number) records invoice numbers issued per vendor at a accounts-payable office; some numbers were voided and never stored. Write a SQL query returning (vendor_id, missing_number) for every invoice number between each vendor's lowest and highest recorded number that has no matching row.


Prompt: invoices.csv (vendor_id, invoice_number) records invoice numbers issued per vendor at a construction firm; some numbers were voided and never stored. Write a SQL query returning (vendor_id, missing_number) for every invoice number between each vendor's lowest and highest recorded number that has no matching row.


Prompt: invoices.csv (vendor_id, invoice_number) records invoice numbers issued per vendor at a catering company; some numbers were voided and never stored. Write a SQL query returning (vendor_id, missing_number) for every invoice number between each vendor's lowest and highest recorded number that has no matching row.


Prompt: invoices.csv (vendor_id, invoice_number) records invoice numbers issued per vendor at a print shop; some numbers were voided and never stored. Write a SQL query returning (vendor_id, missing_number) for every invoice number between each vendor's lowest and highest recorded number that has no matching row.


Prompt: employees.csv (emp_id, department, salary) lists a tech startup's salaries. Write a SQL query returning (department, median), the median salary in each department (the middle value, or the average of the two middle values when a department has an even headcount), rounded to 2 decimals.


Prompt: employees.csv (emp_id, department, salary) lists a hospital system's salaries. Write a SQL query returning (department, median), the median salary in each department (the middle value, or the average of the two middle values when a department has an even headcount), rounded to 2 decimals.


Prompt: employees.csv (emp_id, department, salary) lists a law firm's salaries. Write a SQL query returning (department, median), the median salary in each department (the middle value, or the average of the two middle values when a department has an even headcount), rounded to 2 decimals.


Prompt: employees.csv (emp_id, department, salary) lists a university department's salaries. Write a SQL query returning (department, median), the median salary in each department (the middle value, or the average of the two middle values when a department has an even headcount), rounded to 2 decimals.


Prompt: mrr_snapshots.csv (product_line, month, mrr) records monthly recurring revenue snapshots per product line. Write a SQL query returning (product_line, month, pct_change), the percent change in mrr for each product line relative to that same product line's immediately preceding recorded month.


Prompt: mrr_snapshots.csv (product_line, month, mrr) records monthly recurring revenue snapshots per product line. Write a SQL query returning (product_line, month, pct_change), the percent change in mrr for each product line relative to that same product line's immediately preceding recorded month.


Prompt: mrr_snapshots.csv (product_line, month, mrr) records monthly recurring revenue snapshots per product line. Write a SQL query returning (product_line, month, pct_change), the percent change in mrr for each product line relative to that same product line's immediately preceding recorded month.


Prompt: mrr_snapshots.csv (product_line, month, mrr) records monthly recurring revenue snapshots per product line. Write a SQL query returning (product_line, month, pct_change), the percent change in mrr for each product line relative to that same product line's immediately preceding recorded month.


Prompt: orders.csv (customer_id, order_date, amount) records subscription box service orders. For 2026-04, report a JSON object with keys 'new' and 'returning': the total revenue that month from customers whose global first-ever order falls in 2026-04 ('new'), versus customers who had already ordered at least once before 2026-04 ('returning'), each rounded to 2 decimals.


Prompt: orders.csv (customer_id, order_date, amount) records furniture store orders. For 2026-04, report a JSON object with keys 'new' and 'returning': the total revenue that month from customers whose global first-ever order falls in 2026-04 ('new'), versus customers who had already ordered at least once before 2026-04 ('returning'), each rounded to 2 decimals.


Prompt: orders.csv (customer_id, order_date, amount) records coffee roaster orders. For 2026-04, report a JSON object with keys 'new' and 'returning': the total revenue that month from customers whose global first-ever order falls in 2026-04 ('new'), versus customers who had already ordered at least once before 2026-04 ('returning'), each rounded to 2 decimals.


Prompt: orders.csv (customer_id, order_date, amount) records supplement brand orders. For 2026-04, report a JSON object with keys 'new' and 'returning': the total revenue that month from customers whose global first-ever order falls in 2026-04 ('new'), versus customers who had already ordered at least once before 2026-04 ('returning'), each rounded to 2 decimals.


Prompt: listings.csv (listing_id, city, price) lists properties for sale. Write a SQL query returning the second-highest DISTINCT price in each city, as (city, price) rows.


Prompt: listings.csv (listing_id, city, price) lists vehicles for sale. Write a SQL query returning the second-highest DISTINCT price in each city, as (city, price) rows.


Prompt: listings.csv (listing_id, city, price) lists lots for sale. Write a SQL query returning the second-highest DISTINCT price in each city, as (city, price) rows.


Prompt: listings.csv (listing_id, city, price) lists boats for sale. Write a SQL query returning the second-highest DISTINCT price in each city, as (city, price) rows.


Prompt: orders.csv (customer_id, product_id) records grocery delivery service purchases. Return a single JSON number: the count of distinct customers who purchased BOTH 'A100' and 'B200'.


Prompt: orders.csv (customer_id, product_id) records electronics retailer purchases. Return a single JSON number: the count of distinct customers who purchased BOTH 'LAPTOP-X' and 'DOCK-Y'.


Prompt: orders.csv (customer_id, product_id) records pet store purchases. Return a single JSON number: the count of distinct customers who purchased BOTH 'FOOD-A' and 'TOY-B'.


Prompt: orders.csv (customer_id, product_id) records bookstore purchases. Return a single JSON number: the count of distinct customers who purchased BOTH 'BOOK-1' and 'BOOK-2'.


Prompt: daily_sales.csv (store_id, sale_date, revenue) records daily revenue per retail store; not every calendar day has a recorded row for every store. Write a SQL query returning (store_id, sale_date) for every row whose revenue fell to 80% or less of that store's immediately preceding RECORDED day's revenue.


Prompt: daily_sales.csv (store_id, sale_date, revenue) records daily revenue per restaurant location; not every calendar day has a recorded row for every store. Write a SQL query returning (store_id, sale_date) for every row whose revenue fell to 80% or less of that store's immediately preceding RECORDED day's revenue.


Prompt: daily_sales.csv (store_id, sale_date, revenue) records daily revenue per gas station; not every calendar day has a recorded row for every store. Write a SQL query returning (store_id, sale_date) for every row whose revenue fell to 80% or less of that store's immediately preceding RECORDED day's revenue.


Prompt: daily_sales.csv (store_id, sale_date, revenue) records daily revenue per pharmacy; not every calendar day has a recorded row for every store. Write a SQL query returning (store_id, sale_date) for every row whose revenue fell to 80% or less of that store's immediately preceding RECORDED day's revenue.


Prompt: employees.csv (emp_id, manager_id, name) gives a corporation's reporting hierarchy (manager_id is null for the top of the org). Write a SQL query returning (manager_name, total_reports) rows: for every manager, the total number of people reporting to them at any depth (direct reports and everyone under them).


Prompt: employees.csv (emp_id, manager_id, name) gives a military unit's reporting hierarchy (manager_id is null for the top of the org). Write a SQL query returning (manager_name, total_reports) rows: for every manager, the total number of people reporting to them at any depth (direct reports and everyone under them).


Prompt: employees.csv (emp_id, manager_id, name) gives a nonprofit's reporting hierarchy (manager_id is null for the top of the org). Write a SQL query returning (manager_name, total_reports) rows: for every manager, the total number of people reporting to them at any depth (direct reports and everyone under them).


Prompt: employees.csv (emp_id, manager_id, name) gives a restaurant franchise group's reporting hierarchy (manager_id is null for the top of the org). Write a SQL query returning (manager_name, total_reports) rows: for every manager, the total number of people reporting to them at any depth (direct reports and everyone under them).


Prompt: traffic.csv (channel, day_index, visits) records daily storefront visits per channel over day_index 1 through 30. Write a SQL query returning (channel, day_index, rolling_avg), each day's trailing 7-day average visits for that channel (the current day and the preceding 6), rounded to 2 decimals.


Prompt: traffic.csv (channel, day_index, visits) records daily news site visits per channel over day_index 1 through 30. Write a SQL query returning (channel, day_index, rolling_avg), each day's trailing 7-day average visits for that channel (the current day and the preceding 6), rounded to 2 decimals.


Prompt: traffic.csv (channel, day_index, visits) records daily job board visits per channel over day_index 1 through 30. Write a SQL query returning (channel, day_index, rolling_avg), each day's trailing 7-day average visits for that channel (the current day and the preceding 6), rounded to 2 decimals.


Prompt: traffic.csv (channel, day_index, visits) records daily blog visits per channel over day_index 1 through 30. Write a SQL query returning (channel, day_index, rolling_avg), each day's trailing 7-day average visits for that channel (the current day and the preceding 6), rounded to 2 decimals.


Prompt: daily_shipped.csv (fulfillment_center, day_index, units) records units shipped per fulfillment center per day. Write a SQL query returning (fulfillment_center, day_index, running_total), where running_total is each center's cumulative units shipped up to and including that day.


Prompt: daily_shipped.csv (fulfillment_center, day_index, units) records units shipped per fulfillment center per day. Write a SQL query returning (fulfillment_center, day_index, running_total), where running_total is each center's cumulative units shipped up to and including that day.


Prompt: daily_shipped.csv (fulfillment_center, day_index, units) records units shipped per fulfillment center per day. Write a SQL query returning (fulfillment_center, day_index, running_total), where running_total is each center's cumulative units shipped up to and including that day.


Prompt: daily_shipped.csv (fulfillment_center, day_index, units) records units shipped per fulfillment center per day. Write a SQL query returning (fulfillment_center, day_index, running_total), where running_total is each center's cumulative units shipped up to and including that day.


Prompt: ad_spend.csv (channel, status, amount) records a DTC apparel brand's ad spend per channel; status is 'active' or 'paused'. Report, as a JSON object, each channel's percent share of TOTAL ACTIVE spend (paused spend counted in neither the channel's share nor the total), rounded to 2 decimals.


Prompt: ad_spend.csv (channel, status, amount) records a mobile app's ad spend per channel; status is 'active' or 'paused'. Report, as a JSON object, each channel's percent share of TOTAL ACTIVE spend (paused spend counted in neither the channel's share nor the total), rounded to 2 decimals.


Prompt: ad_spend.csv (channel, status, amount) records a B2B SaaS company's ad spend per channel; status is 'active' or 'paused'. Report, as a JSON object, each channel's percent share of TOTAL ACTIVE spend (paused spend counted in neither the channel's share nor the total), rounded to 2 decimals.


Prompt: ad_spend.csv (channel, status, amount) records a local service business's ad spend per channel; status is 'active' or 'paused'. Report, as a JSON object, each channel's percent share of TOTAL ACTIVE spend (paused spend counted in neither the channel's share nor the total), rounded to 2 decimals.


Prompt: treatments.csv (hospital, severity, outcome) records patient outcomes ('success' or 'failure') for a cardiac treatment, by hospital and case severity. Report, as a JSON object, each hospital's OVERALL success rate (successes divided by total treatments, pooled across all severities), rounded to 4 decimals.


Prompt: treatments.csv (hospital, severity, outcome) records patient outcomes ('success' or 'failure') for a orthopedic surgery treatment, by hospital and case severity. Report, as a JSON object, each hospital's OVERALL success rate (successes divided by total treatments, pooled across all severities), rounded to 4 decimals.


Prompt: treatments.csv (hospital, severity, outcome) records patient outcomes ('success' or 'failure') for a oncology treatment, by hospital and case severity. Report, as a JSON object, each hospital's OVERALL success rate (successes divided by total treatments, pooled across all severities), rounded to 4 decimals.


Prompt: treatments.csv (hospital, severity, outcome) records patient outcomes ('success' or 'failure') for a dialysis treatment, by hospital and case severity. Report, as a JSON object, each hospital's OVERALL success rate (successes divided by total treatments, pooled across all severities), rounded to 4 decimals.


Prompt: measurements.csv (batch_id, value) records individual QC measurements from a auto-parts plant; each batch's value column represents every unit measured in that batch (a complete population, not a sample of it). Write a SQL query returning (batch_id, stddev), the standard deviation of value within each batch, rounded to 4 decimals.


Prompt: measurements.csv (batch_id, value) records individual QC measurements from a textile mill; each batch's value column represents every unit measured in that batch (a complete population, not a sample of it). Write a SQL query returning (batch_id, stddev), the standard deviation of value within each batch, rounded to 4 decimals.


Prompt: measurements.csv (batch_id, value) records individual QC measurements from a bottling plant; each batch's value column represents every unit measured in that batch (a complete population, not a sample of it). Write a SQL query returning (batch_id, stddev), the standard deviation of value within each batch, rounded to 4 decimals.


Prompt: measurements.csv (batch_id, value) records individual QC measurements from a semiconductor fab; each batch's value column represents every unit measured in that batch (a complete population, not a sample of it). Write a SQL query returning (batch_id, stddev), the standard deviation of value within each batch, rounded to 4 decimals.


Prompt: titles.csv (title_id, genre, plays, is_removed) records total plays per title on a video streaming catalog. is_removed marks titles taken down and no longer available to stream. Write a SQL query returning the top 3 title_ids by plays within each genre, considering only titles that are not removed, as (genre, title_id, plays) rows.


Prompt: titles.csv (title_id, genre, plays, is_removed) records total plays per title on a podcast catalog. is_removed marks titles taken down and no longer available to stream. Write a SQL query returning the top 3 title_ids by plays within each genre, considering only titles that are not removed, as (genre, title_id, plays) rows.


Prompt: titles.csv (title_id, genre, plays, is_removed) records total plays per title on a music streaming catalog. is_removed marks titles taken down and no longer available to stream. Write a SQL query returning the top 3 title_ids by plays within each genre, considering only titles that are not removed, as (genre, title_id, plays) rows.


Prompt: titles.csv (title_id, genre, plays, is_removed) records total plays per title on a ebook catalog. is_removed marks titles taken down and no longer available to stream. Write a SQL query returning the top 3 title_ids by plays within each genre, considering only titles that are not removed, as (genre, title_id, plays) rows.


Prompt: reviews_summary.csv (product_id, category, avg_rating, review_count) gives each kitchenware item's average rating and how many reviews it received. Report, as a JSON object, each category's average rating weighted by review_count (i.e. products with more reviews should count for more), rounded to 3 decimals.


Prompt: reviews_summary.csv (product_id, category, avg_rating, review_count) gives each mobile game's average rating and how many reviews it received. Report, as a JSON object, each category's average rating weighted by review_count (i.e. products with more reviews should count for more), rounded to 3 decimals.


Prompt: reviews_summary.csv (product_id, category, avg_rating, review_count) gives each skincare product's average rating and how many reviews it received. Report, as a JSON object, each category's average rating weighted by review_count (i.e. products with more reviews should count for more), rounded to 3 decimals.


Prompt: reviews_summary.csv (product_id, category, avg_rating, review_count) gives each power tool's average rating and how many reviews it received. Report, as a JSON object, each category's average rating weighted by review_count (i.e. products with more reviews should count for more), rounded to 3 decimals.


Prompt: sales.csv (store_id, month, revenue) records monthly revenue per store for a grocery chain; 2025 has a full 12 months recorded, 2026 has only months 2026-01 through 2026-06 recorded so far. Report, as a JSON object, each store's year-over-year percent change, comparing 2026's recorded months against the SAME months in 2025, rounded to 2 decimals.


Prompt: sales.csv (store_id, month, revenue) records monthly revenue per store for a gym franchise; 2025 has a full 12 months recorded, 2026 has only months 2026-01 through 2026-06 recorded so far. Report, as a JSON object, each store's year-over-year percent change, comparing 2026's recorded months against the SAME months in 2025, rounded to 2 decimals.


Prompt: sales.csv (store_id, month, revenue) records monthly revenue per store for a hardware chain; 2025 has a full 12 months recorded, 2026 has only months 2026-01 through 2026-06 recorded so far. Report, as a JSON object, each store's year-over-year percent change, comparing 2026's recorded months against the SAME months in 2025, rounded to 2 decimals.


Prompt: sales.csv (store_id, month, revenue) records monthly revenue per store for a coffee chain; 2025 has a full 12 months recorded, 2026 has only months 2026-01 through 2026-06 recorded so far. Report, as a JSON object, each store's year-over-year percent change, comparing 2026's recorded months against the SAME months in 2025, rounded to 2 decimals.