{
 "questions": [
  {
   "dataset": "chicago",
   "id": "Q01",
   "text": "For the entire sample, return the number of recorded trips.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count all trip records in the sample.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q02",
   "text": "For the entire sample, return the sum of published fares in USD.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum the nonmissing published fare values across the sample.",
     "sql": "SELECT SUM(fare) AS total_fare FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q03",
   "text": "For the entire sample, return the mean published fare in USD, excluding missing fares.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average the published fare values over trips with a nonmissing fare.",
     "sql": "SELECT AVG(fare) AS mean_fare FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q04",
   "text": "For the entire sample, return the total reported trip miles.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum the nonmissing reported trip miles across the sample.",
     "sql": "SELECT SUM(trip_miles) AS total_miles FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q05",
   "text": "For the entire sample, return the mean reported trip miles.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average reported trip miles over trips with nonmissing mileage.",
     "sql": "SELECT AVG(trip_miles) AS mean_miles FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q06",
   "text": "For the entire sample, return the mean duration in minutes from the duration field.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing trip durations in seconds and convert the result to minutes.",
     "sql": "SELECT AVG(trip_seconds) / 60.0 AS mean_minutes FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q07",
   "text": "For the entire sample, return the sum of recorded noncash tips in USD.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum the nonmissing recorded tip values across the sample.",
     "sql": "SELECT SUM(tip) AS total_tips FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q08",
   "text": "For the entire sample, return the number of trips with sharing authorized.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips whose sharing-authorization flag is true.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips WHERE shared_trip_authorized = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q09",
   "text": "For the entire sample, return the number of trips actually matched for sharing.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips whose actual-sharing-match flag is true.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips WHERE shared_trip_match = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q10",
   "text": "For the entire sample, return the fraction of all trips actually matched for sharing.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Divide the number of trips with a true sharing-match flag by the number of all trip records.",
     "sql": "SELECT CAST(COUNT(CASE WHEN shared_trip_match = TRUE THEN 1 END) AS DOUBLE) / NULLIF(COUNT(*), 0) AS matched_fraction FROM trips",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q11",
   "text": "For trips dated January 1, 2024, return the number of recorded trips.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trip records whose published trip date is January 1, 2024.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q12",
   "text": "For trips dated January 1, 2024, return the sum of published fares in USD.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing published fares for trips dated January 1, 2024.",
     "sql": "SELECT SUM(fare) AS total_fare FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q13",
   "text": "For trips dated January 1, 2024, return the mean published fare in USD, excluding missing fares.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing published fares for trips dated January 1, 2024.",
     "sql": "SELECT AVG(fare) AS mean_fare FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q14",
   "text": "For trips dated January 1, 2024, return the total reported trip miles.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing reported miles for trips dated January 1, 2024.",
     "sql": "SELECT SUM(trip_miles) AS total_miles FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q15",
   "text": "For trips dated January 1, 2024, return the mean reported trip miles.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing reported miles for trips dated January 1, 2024.",
     "sql": "SELECT AVG(trip_miles) AS mean_miles FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q16",
   "text": "For trips dated January 1, 2024, return the mean duration in minutes from the duration field.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing duration-field values for trips dated January 1, 2024, converting seconds to minutes.",
     "sql": "SELECT AVG(trip_seconds) / 60.0 AS mean_minutes FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q17",
   "text": "For trips dated January 1, 2024, return the sum of recorded noncash tips in USD.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing recorded tips for trips dated January 1, 2024.",
     "sql": "SELECT SUM(tip) AS total_tips FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q18",
   "text": "For trips dated January 1, 2024, return the number of trips with sharing authorized.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips dated January 1, 2024, whose sharing-authorization flag is true.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips WHERE trip_date = DATE '2024-01-01' AND shared_trip_authorized = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q19",
   "text": "For trips dated January 1, 2024, return the number of trips actually matched for sharing.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips dated January 1, 2024, whose actual-sharing-match flag is true.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips WHERE trip_date = DATE '2024-01-01' AND shared_trip_match = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q20",
   "text": "For trips dated January 1, 2024, return the fraction of all trips actually matched for sharing.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Among all trips dated January 1, 2024, divide the number actually matched by the total number of trips.",
     "sql": "SELECT CAST(COUNT(CASE WHEN shared_trip_match = TRUE THEN 1 END) AS DOUBLE) / NULLIF(COUNT(*), 0) AS matched_fraction FROM trips WHERE trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q21",
   "text": "For each trip date, return the number of recorded trips. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trip records within each published trip date and sort by date.",
     "sql": "SELECT trip_date, COUNT(*) AS trip_count FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q22",
   "text": "For each trip date, return the sum of published fares in USD. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing published fares within each trip date and sort by date.",
     "sql": "SELECT trip_date, SUM(fare) AS total_fare FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q23",
   "text": "For each trip date, return the mean published fare in USD, excluding missing fares. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing published fares within each trip date and sort by date.",
     "sql": "SELECT trip_date, AVG(fare) AS mean_fare FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q24",
   "text": "For each trip date, return the total reported trip miles. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing reported miles within each trip date and sort by date.",
     "sql": "SELECT trip_date, SUM(trip_miles) AS total_miles FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q25",
   "text": "For each trip date, return the mean reported trip miles. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing reported miles within each trip date and sort by date.",
     "sql": "SELECT trip_date, AVG(trip_miles) AS mean_miles FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q26",
   "text": "For each trip date, return the mean duration in minutes from the duration field. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing duration-field values within each trip date, convert seconds to minutes, and sort by date.",
     "sql": "SELECT trip_date, AVG(trip_seconds) / 60.0 AS mean_minutes FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q27",
   "text": "For each trip date, return the sum of recorded noncash tips in USD. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing recorded tips within each trip date and sort by date.",
     "sql": "SELECT trip_date, SUM(tip) AS total_tips FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q28",
   "text": "For each trip date, return the number of trips with sharing authorized. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For each trip date, count records with sharing authorized and sort by date.",
     "sql": "SELECT trip_date, COUNT(CASE WHEN shared_trip_authorized = TRUE THEN 1 END) AS authorized_count FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q29",
   "text": "For each trip date, return the number of trips actually matched for sharing. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For each trip date, count records actually matched for sharing and sort by date.",
     "sql": "SELECT trip_date, COUNT(CASE WHEN shared_trip_match = TRUE THEN 1 END) AS matched_count FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q30",
   "text": "For each trip date, return the fraction of all trips actually matched for sharing. Return date then value, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Within each trip date, divide the actual-sharing-match count by the count of all trips and sort by date.",
     "sql": "SELECT trip_date, CAST(COUNT(CASE WHEN shared_trip_match = TRUE THEN 1 END) AS DOUBLE) / NULLIF(COUNT(*), 0) AS matched_fraction FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q31",
   "text": "For each sharing-authorization status, return the trip count. Return status then count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trip records grouped by the recorded sharing-authorization status, retaining a missing-status group if present.",
     "sql": "SELECT shared_trip_authorized, COUNT(*) AS trip_count FROM trips GROUP BY shared_trip_authorized",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q32",
   "text": "For each actual-sharing-match status, return total published fare. Return status then fare.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing published fares by recorded actual-sharing-match status, retaining a missing-status group if present.",
     "sql": "SELECT shared_trip_match, SUM(fare) AS total_fare FROM trips GROUP BY shared_trip_match",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q33",
   "text": "For each date, return trip count and mean published fare, excluding missing fares from the mean. Return date, count, mean, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For each trip date, count all trips and average fares over only trips with nonmissing fares, sorting by date.",
     "sql": "SELECT trip_date, COUNT(*) AS trip_count, AVG(fare) AS mean_fare FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q34",
   "text": "Among trips authorized for sharing, return the fraction of trips actually matched.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Among trips with sharing authorized, divide the actual-sharing-match count by the count of all authorized trips.",
     "sql": "SELECT CAST(COUNT(CASE WHEN shared_trip_match = TRUE THEN 1 END) AS DOUBLE) / NULLIF(COUNT(*), 0) AS matched_fraction FROM trips WHERE shared_trip_authorized = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q35",
   "text": "Among trips not authorized for sharing, return the count actually matched. Retain inconsistent source records.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count records with authorization explicitly false and actual match explicitly true, retaining those inconsistent records.",
     "sql": "SELECT COUNT(*) AS matched_count FROM trips WHERE shared_trip_authorized = FALSE AND shared_trip_match = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q36",
   "text": "Among actually matched trips, return mean duration in minutes.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing durations among trips whose actual-sharing-match flag is true, converting seconds to minutes.",
     "sql": "SELECT AVG(trip_seconds) / 60.0 AS mean_minutes FROM trips WHERE shared_trip_match = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q37",
   "text": "Among unmatched trips, return mean published fare, excluding missing fares.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing published fares among trips whose actual-sharing-match flag is explicitly false.",
     "sql": "SELECT AVG(fare) AS mean_fare FROM trips WHERE shared_trip_match = FALSE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q38",
   "text": "For January 2, 2024, return total published fares and total noncash tips, in that column order.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For trips dated January 2, 2024, separately sum nonmissing published fares and recorded tips.",
     "sql": "SELECT SUM(fare) AS total_fare, SUM(tip) AS total_tips FROM trips WHERE trip_date = DATE '2024-01-02'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q39",
   "text": "For each date, return count of sharing-authorized trips and count of actually matched trips. Return date, authorized count, matched count, sorted by date.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For each trip date, independently count true authorization flags and true match flags, then sort by date.",
     "sql": "SELECT trip_date, COUNT(CASE WHEN shared_trip_authorized = TRUE THEN 1 END) AS authorized_count, COUNT(CASE WHEN shared_trip_match = TRUE THEN 1 END) AS matched_count FROM trips GROUP BY trip_date ORDER BY trip_date",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q40",
   "text": "For dates from January 1 through January 2, 2024 inclusive, return mean trip miles and mean duration in minutes, in that order.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Across trips dated January 1 or January 2, 2024, separately average nonmissing miles and nonmissing durations converted to minutes.",
     "sql": "SELECT AVG(trip_miles) AS mean_miles, AVG(trip_seconds) / 60.0 AS mean_minutes FROM trips WHERE trip_date >= DATE '2024-01-01' AND trip_date <= DATE '2024-01-02'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q41",
   "text": "For each pickup area name, return trip count. Return area name then count, including unavailable areas.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips by pickup area name, including the outside-Chicago-or-unavailable bucket and retaining trips without a matching area name.",
     "sql": "SELECT z.zone_name, COUNT(*) AS trip_count FROM trips t LEFT JOIN zones z ON t.pickup_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q42",
   "text": "For each dropoff area name, return trip count. Return area name then count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips grouped by dropoff area name, including the supplied outside-Chicago-or-unavailable area.",
     "sql": "SELECT z.zone_name, COUNT(*) AS trip_count FROM trips t LEFT JOIN zones z ON t.dropoff_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q43",
   "text": "For each pickup area name, return mean published fare excluding missing fares. Return area then mean.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing published fares among trips grouped by pickup area name.",
     "sql": "SELECT z.zone_name, AVG(t.fare) AS mean_fare FROM trips t LEFT JOIN zones z ON t.pickup_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q44",
   "text": "For each dropoff area name, return total miles. Return area then miles.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing reported trip miles among trips grouped by dropoff area name.",
     "sql": "SELECT z.zone_name, SUM(t.trip_miles) AS total_miles FROM trips t LEFT JOIN zones z ON t.dropoff_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q45",
   "text": "For each pickup area name, return actual sharing-match fraction among all its trips. Return area then fraction.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Within each pickup area name, divide the count of trips actually matched for sharing by the count of all trips.",
     "sql": "SELECT z.zone_name, CAST(COUNT(CASE WHEN t.shared_trip_match = TRUE THEN 1 END) AS DOUBLE) / NULLIF(COUNT(*), 0) AS matched_fraction FROM trips t LEFT JOIN zones z ON t.pickup_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q46",
   "text": "For each pickup area and sharing-authorization status, return trip count. Return area, status, count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips for each combination of pickup area name and recorded sharing-authorization status.",
     "sql": "SELECT z.zone_name, t.shared_trip_authorized, COUNT(*) AS trip_count FROM trips t LEFT JOIN zones z ON t.pickup_zone_id = z.zone_id GROUP BY z.zone_name, t.shared_trip_authorized",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q47",
   "text": "For each trip date and pickup area name, return total published fare. Return date, area, fare, sorted by date then area.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing published fares for each trip date and pickup area name, sorting by date and then area name.",
     "sql": "SELECT t.trip_date, z.zone_name, SUM(t.fare) AS total_fare FROM trips t LEFT JOIN zones z ON t.pickup_zone_id = z.zone_id GROUP BY t.trip_date, z.zone_name ORDER BY t.trip_date, z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q48",
   "text": "For each pickup and dropoff area-name pair, return trip count. Return pickup name, dropoff name, count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips for each combination of pickup area name and dropoff area name.",
     "sql": "SELECT p.zone_name AS pickup_name, d.zone_name AS dropoff_name, COUNT(*) AS trip_count FROM trips t LEFT JOIN zones p ON t.pickup_zone_id = p.zone_id LEFT JOIN zones d ON t.dropoff_zone_id = d.zone_id GROUP BY p.zone_name, d.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q49",
   "text": "For each dropoff area name, return mean duration in minutes and mean fare excluding missing fares. Return area, duration, fare.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For each dropoff area name, separately average nonmissing durations converted to minutes and nonmissing published fares.",
     "sql": "SELECT z.zone_name, AVG(t.trip_seconds) / 60.0 AS mean_minutes, AVG(t.fare) AS mean_fare FROM trips t LEFT JOIN zones z ON t.dropoff_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q50",
   "text": "For each pickup area name, return total recorded noncash tips and number of trips. Return area, tips, count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For each pickup area name, sum nonmissing recorded tips and count all trips.",
     "sql": "SELECT z.zone_name, SUM(t.tip) AS total_tips, COUNT(*) AS trip_count FROM trips t LEFT JOIN zones z ON t.pickup_zone_id = z.zone_id GROUP BY z.zone_name",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q51",
   "text": "For trips picked up in Rogers Park on January 1, 2024, return total published fare.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum nonmissing published fares for trips picked up in Rogers Park and dated January 1, 2024.",
     "sql": "SELECT SUM(t.fare) AS total_fare FROM trips t JOIN zones z ON t.pickup_zone_id = z.zone_id WHERE z.zone_name = 'Rogers Park' AND t.trip_date = DATE '2024-01-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q52",
   "text": "For trips dropped off in West Ridge and actually matched for sharing, return trip count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count trips dropped off in West Ridge whose actual-sharing-match flag is true.",
     "sql": "SELECT COUNT(*) AS trip_count FROM trips t JOIN zones z ON t.dropoff_zone_id = z.zone_id WHERE z.zone_name = 'West Ridge' AND t.shared_trip_match = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q53",
   "text": "For trips picked up in Rogers Park and not authorized for sharing, return mean miles.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Average nonmissing reported miles for trips picked up in Rogers Park whose sharing-authorization flag is explicitly false.",
     "sql": "SELECT AVG(t.trip_miles) AS mean_miles FROM trips t JOIN zones z ON t.pickup_zone_id = z.zone_id WHERE z.zone_name = 'Rogers Park' AND t.shared_trip_authorized = FALSE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q54",
   "text": "For trips picked up in the unavailable/outside-Chicago bucket on January 2, 2024, return count and total fare, in that order.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "For trips dated January 2, 2024, with pickup zone zero, count trips and sum nonmissing published fares.",
     "sql": "SELECT COUNT(*) AS trip_count, SUM(fare) AS total_fare FROM trips WHERE pickup_zone_id = 0 AND trip_date = DATE '2024-01-02'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "chicago",
   "id": "Q55",
   "text": "For trips picked up in West Ridge and authorized for sharing, return actual sharing-match fraction of all filtered trips.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Among all sharing-authorized trips picked up in West Ridge, divide the actual-sharing-match count by the total filtered trip count.",
     "sql": "SELECT CAST(COUNT(CASE WHEN t.shared_trip_match = TRUE THEN 1 END) AS DOUBLE) / NULLIF(COUNT(*), 0) AS matched_fraction FROM trips t JOIN zones z ON t.pickup_zone_id = z.zone_id WHERE z.zone_name = 'West Ridge' AND t.shared_trip_authorized = TRUE",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B01",
   "text": "What was gross card spend in CAD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "The question does not specify whether to use the daily card-spend mart or purchase events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For purchase events, July could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD gross purchases recorded in the daily card-spend mart for July.",
     "sql": "SELECT COALESCE(SUM(purchased_minor), 0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum CAD posted purchase events whose posting dates fall in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum CAD posted purchase events whose occurrence dates fall in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B02",
   "text": "What was gross card spend in USD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "The question does not specify whether to use the daily card-spend mart or purchase events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For purchase events, July could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum USD gross purchases recorded in the daily card-spend mart for July.",
     "sql": "SELECT COALESCE(SUM(purchased_minor), 0) FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum USD posted purchase events whose posting dates fall in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'USD' AND event_kind = 'purchase' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum USD posted purchase events whose occurrence dates fall in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'USD' AND event_kind = 'purchase' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B03",
   "text": "What was the refunded card amount in CAD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "refund source",
     "bank_label": "metric_definition",
     "what_is_open": "The question does not specify whether to use the daily refunded amount or refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For refund events, July could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD refunds recorded in the daily card-spend mart for July.",
     "sql": "SELECT COALESCE(SUM(refunded_minor), 0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum CAD posted refund events whose posting dates fall in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'refund' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum CAD posted refund events whose occurrence dates fall in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'refund' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B04",
   "text": "What was net card spend in CAD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Net spend could use the daily mart or be calculated from purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July spend could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce spend in their own reporting month or the month of the original purchase."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD net spend recorded in the daily card-spend mart for July.",
     "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Subtract CAD refunds posted in July from CAD purchases posted in July.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('purchase', 'refund') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Subtract posted CAD refunds occurring in July from posted CAD purchases occurring in July.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('purchase', 'refund') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Net CAD purchases posted in July against all their posted refunds present at the snapshot, attributing refunds to the purchase month.",
     "sql": "SELECT COALESCE(SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)), 0) FROM transactions p WHERE p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B05",
   "text": "What was net card spend in USD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Net spend could use the daily mart or be calculated from purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July spend could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce spend in their own reporting month or the month of the original purchase."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum USD net spend recorded in the daily card-spend mart for July.",
     "sql": "SELECT COALESCE(SUM(net_spend_minor), 0) FROM card_spend_daily WHERE currency = 'USD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Subtract USD refunds posted in July from USD purchases posted in July.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('purchase', 'refund') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Subtract posted USD refunds occurring in July from posted USD purchases occurring in July.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('purchase', 'refund') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R4",
     "words": "Net USD purchases posted in July against all their posted refunds present at the snapshot, attributing refunds to the purchase month.",
     "sql": "SELECT COALESCE(SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'USD'), 0)), 0) FROM transactions p WHERE p.currency = 'USD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B06",
   "text": "How many CAD purchase events contributed to July 2026 card spend? Return one count.",
   "open": true,
   "choices": [
    {
     "kind": "purchase-count source",
     "bank_label": "metric_definition",
     "what_is_open": "The count could use the daily mart's purchase counts or qualifying purchase-event rows."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For purchase events, July could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD purchase counts in the July daily card-spend mart.",
     "sql": "SELECT COALESCE(SUM(purchase_count), 0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Count CAD posted purchase events posted in July.",
     "sql": "SELECT COUNT(*) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Count CAD posted purchase events occurring in July.",
     "sql": "SELECT COUNT(*) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B07",
   "text": "Break down July 2026 net card spend in CAD by category label, including the uncategorized bucket. Return category label and net minor units for categories with activity.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Category spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could count in their own month and category or against their original July purchases and purchase categories."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Group July CAD daily-mart net spend by category label, putting missing labels in an uncategorized bucket.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(s.net_spend_minor) FROM card_spend_daily s LEFT JOIN categories c ON c.category_id = s.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Group CAD purchases and refunds posted in July by their event category labels, subtracting refunds.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t LEFT JOIN categories c ON c.category_id = t.category_id WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Group posted CAD purchases and refunds occurring in July by their event category labels, subtracting refunds.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t LEFT JOIN categories c ON c.category_id = t.category_id WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Group CAD purchases posted in July by purchase category and deduct all their posted refunds present at the snapshot.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)) FROM transactions p LEFT JOIN categories c ON c.category_id = p.category_id WHERE p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B08",
   "text": "Break down July 2026 net card spend in USD by category label, including the uncategorized bucket. Return category label and net minor units for categories with activity.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Category spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could count in their own month and category or against their original July purchases and purchase categories."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Group July USD daily-mart net spend by category label, putting missing labels in an uncategorized bucket.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(s.net_spend_minor) FROM card_spend_daily s LEFT JOIN categories c ON c.category_id = s.category_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Group USD purchases and refunds posted in July by their event category labels, subtracting refunds.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t LEFT JOIN categories c ON c.category_id = t.category_id WHERE t.currency = 'USD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Group posted USD purchases and refunds occurring in July by their event category labels, subtracting refunds.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t LEFT JOIN categories c ON c.category_id = t.category_id WHERE t.currency = 'USD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R4",
     "words": "Group USD purchases posted in July by purchase category and deduct all their posted refunds present at the snapshot.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized'), SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'USD'), 0)) FROM transactions p LEFT JOIN categories c ON c.category_id = p.category_id WHERE p.currency = 'USD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized')",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B09",
   "text": "Break down July 2026 net card spend in CAD by organization. Return organization_id and net minor units for organizations with card activity.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Organization spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce their own month's spend or the spend of the original purchase month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum July CAD daily-mart net spend by the account's organization for organizations represented in the mart.",
     "sql": "SELECT a.organization_id, SUM(s.net_spend_minor) FROM card_spend_daily s JOIN accounts a ON a.account_id = s.account_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum CAD purchases less refunds posted in July by organization, retaining organizations with qualifying events.",
     "sql": "SELECT a.organization_id, SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum posted CAD purchases less refunds occurring in July by organization, retaining organizations with qualifying events.",
     "sql": "SELECT a.organization_id, SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Group CAD purchases posted in July by organization and deduct all their posted refunds present at the snapshot.",
     "sql": "SELECT a.organization_id, SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)) FROM transactions p JOIN accounts a ON a.account_id = p.account_id WHERE p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B10",
   "text": "Break down July 2026 net card spend in USD by organization. Return organization_id and net minor units for organizations with card activity.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Organization spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce their own month's spend or the spend of the original purchase month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum July USD daily-mart net spend by the account's organization for organizations represented in the mart.",
     "sql": "SELECT a.organization_id, SUM(s.net_spend_minor) FROM card_spend_daily s JOIN accounts a ON a.account_id = s.account_id WHERE s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum USD purchases less refunds posted in July by organization, retaining organizations with qualifying events.",
     "sql": "SELECT a.organization_id, SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.currency = 'USD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum posted USD purchases less refunds occurring in July by organization, retaining organizations with qualifying events.",
     "sql": "SELECT a.organization_id, SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.currency = 'USD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R4",
     "words": "Group USD purchases posted in July by organization and deduct all their posted refunds present at the snapshot.",
     "sql": "SELECT a.organization_id, SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'USD'), 0)) FROM transactions p JOIN accounts a ON a.account_id = p.account_id WHERE p.currency = 'USD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY a.organization_id",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B11",
   "text": "For every CAD account, including zero-spend accounts, show July 2026 net card spend. Return account_id and net minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Account spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce their own month's spend or the spend of the original purchase month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Show every CAD account with its July daily-mart net spend, substituting zero when it has no matching spend.",
     "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Show every CAD account with purchases less refunds posted in July, substituting zero for no qualifying events.",
     "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END), 0) FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Show every CAD account with posted purchases less refunds occurring in July, substituting zero for no qualifying events.",
     "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END), 0) FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Show every CAD account with its purchases posted in July less all their posted refunds present at the snapshot.",
     "sql": "SELECT a.account_id, COALESCE(SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)), 0) FROM accounts a LEFT JOIN transactions p ON p.account_id = a.account_id AND p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B12",
   "text": "For every USD account, including zero-spend accounts, show July 2026 net card spend. Return account_id and net minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Account spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce their own month's spend or the spend of the original purchase month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Show every USD account with its July daily-mart net spend, substituting zero when it has no matching spend.",
     "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'USD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'USD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Show every USD account with purchases less refunds posted in July, substituting zero for no qualifying events.",
     "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END), 0) FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.currency = 'USD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'USD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Show every USD account with posted purchases less refunds occurring in July, substituting zero for no qualifying events.",
     "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END), 0) FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.currency = 'USD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'USD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R4",
     "words": "Show every USD account with its purchases posted in July less all their posted refunds present at the snapshot.",
     "sql": "SELECT a.account_id, COALESCE(SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'USD'), 0)), 0) FROM accounts a LEFT JOIN transactions p ON p.account_id = a.account_id AND p.currency = 'USD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'USD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B13",
   "text": "Show daily CAD net card spend during July 2026, only dates with card activity, in chronological order. Return UTC date as YYYY-MM-DD and net minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Daily net spend could use the daily mart or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Daily event activity could be assigned to posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce spend on the refund date or on the original purchase date."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD daily-mart net spend by spend date for July dates represented in the mart.",
     "sql": "SELECT STRFTIME(spend_date, '%Y-%m-%d') AS utc_date, SUM(net_spend_minor) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date >= DATE '2026-07-01' AND spend_date < DATE '2026-08-01' GROUP BY spend_date ORDER BY spend_date ASC",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum CAD purchases less refunds by UTC posting date for July dates with posted card events.",
     "sql": "SELECT STRFTIME(CAST(posted_at AS DATE), '%Y-%m-%d') AS utc_date, SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor ELSE -amount_minor END) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('purchase', 'refund') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY CAST(posted_at AS DATE) ORDER BY CAST(posted_at AS DATE) ASC",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum posted CAD purchases less refunds by UTC occurrence date for July dates with qualifying events.",
     "sql": "SELECT STRFTIME(CAST(occurred_at AS DATE), '%Y-%m-%d') AS utc_date, SUM(CASE WHEN event_kind = 'purchase' THEN amount_minor ELSE -amount_minor END) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('purchase', 'refund') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY CAST(occurred_at AS DATE) ORDER BY CAST(occurred_at AS DATE) ASC",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Group CAD purchases posted in July by UTC purchase posting date and deduct all their posted refunds present at the snapshot.",
     "sql": "SELECT STRFTIME(CAST(p.posted_at AS DATE), '%Y-%m-%d') AS utc_date, SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)) FROM transactions p WHERE p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY CAST(p.posted_at AS DATE) ORDER BY CAST(p.posted_at AS DATE) ASC",
     "status": "ok",
     "same_as_key": false
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B14",
   "text": "Which three CAD accounts had the highest July 2026 net card spend? Include all accounts as candidates. Return account_id and net minor units, descending by spend and then ascending by account_id to break ties.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "The ranking could use daily-mart net spend or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could reduce their own month's spend or the spend of the original purchase month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Rank all CAD accounts by July daily-mart net spend, including zero-spend accounts.",
     "sql": "SELECT a.account_id, COALESCE(SUM(s.net_spend_minor), 0) AS net_minor FROM accounts a LEFT JOIN card_spend_daily s ON s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Rank all CAD accounts by purchases less refunds posted in July, including zero-spend accounts.",
     "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_minor FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Rank all CAD accounts by posted purchases less refunds occurring in July, including zero-spend accounts.",
     "sql": "SELECT a.account_id, COALESCE(SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END), 0) AS net_minor FROM accounts a LEFT JOIN transactions t ON t.account_id = a.account_id AND t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Rank all CAD accounts by purchases posted in July less all their posted refunds present at the snapshot.",
     "sql": "SELECT a.account_id, COALESCE(SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)), 0) AS net_minor FROM accounts a LEFT JOIN transactions p ON p.account_id = a.account_id AND p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' WHERE a.currency = 'CAD' GROUP BY a.account_id ORDER BY net_minor DESC, a.account_id ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B15",
   "text": "Which three category labels had the highest July 2026 net card spend in CAD? Include the uncategorized bucket. Return category label and net minor units, descending by spend and then ascending by label to break ties.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "The ranking could use daily-mart net spend or purchase and refund events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "Event-based July activity could use posting dates or occurrence dates."
    },
    {
     "kind": "refund attribution",
     "bank_label": "metric_definition",
     "what_is_open": "Refunds could count in their own month and category or against original July purchases."
    },
    {
     "kind": "candidate categories",
     "bank_label": "other",
     "what_is_open": "The candidates could be labels with July activity or all category labels with zero assigned to inactive labels."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Rank category labels with July CAD daily-mart activity, including uncategorized activity, by net spend.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON c.category_id = s.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, label ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Rank category labels with CAD purchases or refunds posted in July by purchases less refunds.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS label, SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) AS net_minor FROM transactions t LEFT JOIN categories c ON c.category_id = t.category_id WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, label ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Rank category labels with posted CAD purchases or refunds occurring in July by purchases less refunds.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS label, SUM(CASE WHEN t.event_kind = 'purchase' THEN t.amount_minor ELSE -t.amount_minor END) AS net_minor FROM transactions t LEFT JOIN categories c ON c.category_id = t.category_id WHERE t.currency = 'CAD' AND t.status = 'posted' AND t.event_kind IN ('purchase', 'refund') AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, label ASC LIMIT 3",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Rank July CAD purchase categories after deducting all posted refunds linked to those purchases at the snapshot.",
     "sql": "SELECT COALESCE(c.category_name, 'Uncategorized') AS label, SUM(p.amount_minor - COALESCE((SELECT SUM(r.amount_minor) FROM transactions r WHERE r.related_transaction_id = p.transaction_id AND r.event_kind = 'refund' AND r.status = 'posted' AND r.currency = 'CAD'), 0)) AS net_minor FROM transactions p LEFT JOIN categories c ON c.category_id = p.category_id WHERE p.currency = 'CAD' AND p.event_kind = 'purchase' AND p.status = 'posted' AND p.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND p.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY COALESCE(c.category_name, 'Uncategorized') ORDER BY net_minor DESC, label ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R5",
     "words": "Rank all category labels and an uncategorized bucket by July CAD daily-mart net spend, assigning zero to inactive labels.",
     "sql": "WITH labels AS (SELECT COALESCE(c.category_name, 'Uncategorized') AS label FROM (SELECT category_name FROM categories GROUP BY category_name) c FULL OUTER JOIN (SELECT COUNT(*) AS n FROM categories) z ON FALSE), spend AS (SELECT COALESCE(c.category_name, 'Uncategorized') AS label, SUM(s.net_spend_minor) AS net_minor FROM card_spend_daily s LEFT JOIN categories c ON c.category_id = s.category_id WHERE s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' GROUP BY COALESCE(c.category_name, 'Uncategorized')) SELECT l.label, COALESCE(s.net_minor, 0) AS net_minor FROM labels l LEFT JOIN spend s ON s.label = l.label ORDER BY net_minor DESC, l.label ASC LIMIT 3",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B16",
   "text": "At the snapshot, how many active cards does every CAD account have? Include accounts with none. Return account_id and active-card count.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count snapshot cards marked active for every CAD account, including accounts with no active cards.",
     "sql": "SELECT a.account_id, COUNT(c.card_id) FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' WHERE a.currency = 'CAD' GROUP BY a.account_id",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B17",
   "text": "At the snapshot, how many active cards are there in each account currency? Return currency and active-card count, retaining currencies with no active cards.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count snapshot cards marked active by their accounts' currencies, retaining currencies represented by accounts even when their active-card count is zero.",
     "sql": "SELECT a.currency, COUNT(c.card_id) FROM accounts a LEFT JOIN cards c ON c.account_id = a.account_id AND c.card_status = 'active' GROUP BY a.currency",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B18",
   "text": "For each CAD purchase that received a refund in July 2026, show original transaction_id, original purchase amount and the total refunded during July, all amounts in minor units. The original purchase may be in another reporting period.",
   "open": true,
   "choices": [
    {
     "kind": "refund reporting date",
     "bank_label": "time_window",
     "what_is_open": "A refund received in July could mean a refund posted in July or a posted refund that occurred in July."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "For each CAD purchase linked to posted CAD refunds posted in July, return the purchase identifier, original amount and July refund total.",
     "sql": "SELECT p.transaction_id, p.amount_minor, SUM(r.amount_minor) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "For each CAD purchase linked to posted CAD refunds occurring in July, return the purchase identifier, original amount and July refund total.",
     "sql": "SELECT p.transaction_id, p.amount_minor, SUM(r.amount_minor) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY p.transaction_id, p.amount_minor",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B19",
   "text": "How many distinct CAD purchases received at least one refund during July 2026? Return one count, including purchases from earlier periods.",
   "open": true,
   "choices": [
    {
     "kind": "refund reporting date",
     "bank_label": "time_window",
     "what_is_open": "A refund received in July could mean a refund posted in July or a posted refund that occurred in July."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Count distinct CAD purchases linked to at least one posted CAD refund posted in July, regardless of purchase date.",
     "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Count distinct CAD purchases linked to at least one posted CAD refund occurring in July, regardless of purchase date.",
     "sql": "SELECT COUNT(DISTINCT p.transaction_id) FROM transactions p JOIN transactions r ON r.related_transaction_id = p.transaction_id WHERE p.event_kind = 'purchase' AND p.currency = 'CAD' AND r.event_kind = 'refund' AND r.currency = 'CAD' AND r.status = 'posted' AND r.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND r.occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B20",
   "text": "What was the deposit amount in CAD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "July deposits could be assigned using posting dates or occurrence dates."
    },
    {
     "kind": "deposit status",
     "bank_label": "metric_definition",
     "what_is_open": "The deposit amount could cover posted deposits or include pending deposits initiated in the month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD deposits posted in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'deposit' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum posted CAD deposits occurring in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'deposit' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum CAD deposits initiated in July that are posted or pending at the snapshot.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'deposit' AND status IN ('posted', 'pending') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B21",
   "text": "What was the deposit amount in USD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "July deposits could be assigned using posting dates or occurrence dates."
    },
    {
     "kind": "deposit status",
     "bank_label": "metric_definition",
     "what_is_open": "The deposit amount could cover posted deposits or include pending deposits initiated in the month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum USD deposits posted in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'USD' AND event_kind = 'deposit' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum posted USD deposits occurring in July.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'USD' AND event_kind = 'deposit' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum USD deposits initiated in July that are posted or pending at the snapshot.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'USD' AND event_kind = 'deposit' AND status IN ('posted', 'pending') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B22",
   "text": "What was the withdrawal amount in CAD during July 2026? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "July withdrawals could be assigned using posting dates or occurrence dates."
    },
    {
     "kind": "withdrawal status",
     "bank_label": "metric_definition",
     "what_is_open": "The withdrawal amount could cover posted withdrawals or include pending withdrawals initiated in the month."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD withdrawals posted in July as a positive withdrawal amount.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'withdrawal' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum posted CAD withdrawals occurring in July as a positive withdrawal amount.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'withdrawal' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum CAD withdrawals initiated in July that are posted or pending at the snapshot.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'withdrawal' AND status IN ('posted', 'pending') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B23",
   "text": "What was net external cash flow in CAD during July 2026? Return one signed amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "external-flow scope",
     "bank_label": "metric_definition",
     "what_is_open": "External cash flow could mean deposits less withdrawals or all signed ledger events except internal transfers."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "July cash flow could use posting dates or occurrence dates of posted events."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Calculate CAD deposits less withdrawals posted in July, excluding card activity and transfers.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'deposit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R2",
     "words": "Calculate all CAD posted nontransfer credits less debits posted in July, including purchases and refunds.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Calculate posted CAD deposits less withdrawals occurring in July, excluding card activity and transfers.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'deposit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Calculate all posted CAD nontransfer credits less debits occurring in July, including purchases and refunds.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'CAD' AND status = 'posted' AND event_kind <> 'transfer' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B24",
   "text": "What was net external cash flow in USD during July 2026? Return one signed amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "external-flow scope",
     "bank_label": "metric_definition",
     "what_is_open": "External cash flow could mean deposits less withdrawals or all signed ledger events except internal transfers."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "July cash flow could use posting dates or occurrence dates of posted events."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Calculate USD deposits less withdrawals posted in July, excluding card activity and transfers.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'deposit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R2",
     "words": "Calculate all USD posted nontransfer credits less debits posted in July, including purchases and refunds.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind <> 'transfer' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Calculate posted USD deposits less withdrawals occurring in July, excluding card activity and transfers.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN event_kind = 'deposit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind IN ('deposit', 'withdrawal') AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    },
    {
     "reading": "R4",
     "words": "Calculate all posted USD nontransfer credits less debits occurring in July, including purchases and refunds.",
     "sql": "SELECT COALESCE(SUM(CASE WHEN direction = 'credit' THEN amount_minor ELSE -amount_minor END), 0) FROM transactions WHERE currency = 'USD' AND status = 'posted' AND event_kind <> 'transfer' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B25",
   "text": "What was internal transfer volume in CAD during July 2026? Count each transfer once. Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "transfer inclusion and amount",
     "bank_label": "metric_definition",
     "what_is_open": "A transfer could qualify when its outgoing leg posts, when either leg posts, or only when both legs have posted."
    },
    {
     "kind": "transfer reporting date",
     "bank_label": "time_window",
     "what_is_open": "July could refer to outgoing posting, event occurrence, or the final posting that completes a transfer."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum each CAD transfer's outgoing posted amount once when its outgoing leg posts in July.",
     "sql": "SELECT COALESCE(SUM(x.amount_minor), 0) FROM (SELECT transfer_group_id, MAX(amount_minor) AS amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) x",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Count a CAD transfer's amount once if either posted leg has a July posting date.",
     "sql": "SELECT COALESCE(SUM(x.amount_minor), 0) FROM (SELECT transfer_group_id, MAX(amount_minor) AS amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'transfer' AND status = 'posted' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) x",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum each CAD transfer's outgoing posted amount once when its outgoing occurrence date is in July.",
     "sql": "SELECT COALESCE(SUM(x.amount_minor), 0) FROM (SELECT transfer_group_id, MAX(amount_minor) AS amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND transfer_group_id IS NOT NULL AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY transfer_group_id) x",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R4",
     "words": "Sum CAD transfer amounts once only for groups with both posted directions whose final leg posts in July.",
     "sql": "SELECT COALESCE(SUM(x.amount_minor), 0) FROM (SELECT transfer_group_id, MAX(CASE WHEN direction = 'debit' THEN amount_minor END) AS amount_minor FROM transactions WHERE currency = 'CAD' AND event_kind = 'transfer' AND transfer_group_id IS NOT NULL GROUP BY transfer_group_id HAVING MAX(CASE WHEN direction = 'debit' AND status = 'posted' THEN 1 ELSE 0 END) = 1 AND MAX(CASE WHEN direction = 'credit' AND status = 'posted' THEN 1 ELSE 0 END) = 1 AND MAX(CASE WHEN status = 'posted' THEN posted_at END) >= TIMESTAMP '2026-07-01 00:00:00' AND MAX(CASE WHEN status = 'posted' THEN posted_at END) < TIMESTAMP '2026-08-01 00:00:00') x",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B26",
   "text": "How many internal transfers completed during July 2026, by currency? Count each transfer once. Return currency and transfer count.",
   "open": true,
   "choices": [
    {
     "kind": "completion rule",
     "bank_label": "metric_definition",
     "what_is_open": "Completion could require both transfer legs to be posted or be represented by a posted outgoing transfer event."
    },
    {
     "kind": "completion date",
     "bank_label": "time_window",
     "what_is_open": "July completion could be assigned using the final leg's posting date, outgoing posting date, or the occurrence date of an event that is posted at the snapshot."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Count transfer groups by currency only when both directions are posted and the last posted leg falls in July.",
     "sql": "SELECT x.currency, COUNT(*) FROM (SELECT currency, transfer_group_id FROM transactions WHERE event_kind = 'transfer' AND transfer_group_id IS NOT NULL GROUP BY currency, transfer_group_id HAVING MAX(CASE WHEN direction = 'debit' AND status = 'posted' THEN 1 ELSE 0 END) = 1 AND MAX(CASE WHEN direction = 'credit' AND status = 'posted' THEN 1 ELSE 0 END) = 1 AND MAX(CASE WHEN status = 'posted' THEN posted_at END) >= TIMESTAMP '2026-07-01 00:00:00' AND MAX(CASE WHEN status = 'posted' THEN posted_at END) < TIMESTAMP '2026-08-01 00:00:00') x GROUP BY x.currency",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Count distinct transfer groups by currency using outgoing transfer legs posted in July as completed transfers.",
     "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Count distinct transfer groups by currency if any posted leg has a July posting date.",
     "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND transfer_group_id IS NOT NULL AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R4",
     "words": "Count distinct transfer groups by currency using outgoing events occurring in July that are posted at the snapshot.",
     "sql": "SELECT currency, COUNT(DISTINCT transfer_group_id) FROM transactions WHERE event_kind = 'transfer' AND status = 'posted' AND direction = 'debit' AND transfer_group_id IS NOT NULL AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY currency",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B27",
   "text": "What was the combined closing ledger balance of all CAD accounts on 2026-07-31? Return one signed amount in minor units.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD closing ledger balances in the account daily table for July 31, without restricting account status.",
     "sql": "SELECT COALESCE(SUM(closing_minor), 0) FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-31'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B28",
   "text": "What was the combined closing ledger balance of all USD accounts on 2026-07-31? Return one signed amount in minor units.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum USD closing ledger balances in the account daily table for July 31, without restricting account status.",
     "sql": "SELECT COALESCE(SUM(closing_minor), 0) FROM account_daily WHERE currency = 'USD' AND balance_date = DATE '2026-07-31'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B29",
   "text": "What was the combined opening ledger balance of all CAD accounts on 2026-07-01? Return one signed amount in minor units.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD opening ledger balances in the account daily table for July 1, without restricting account status.",
     "sql": "SELECT COALESCE(SUM(opening_minor), 0) FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-01'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B30",
   "text": "What was the combined closing ledger balance of all CAD accounts on 2026-07-15? Return one signed amount in minor units.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD closing ledger balances in the account daily table for July 15, without restricting account status.",
     "sql": "SELECT COALESCE(SUM(closing_minor), 0) FROM account_daily WHERE currency = 'CAD' AND balance_date = DATE '2026-07-15'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B31",
   "text": "What was gross CAD card spend on 2026-07-01? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Gross spend could use the daily card-spend mart or purchase events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For purchase events, July 1 could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD purchased amounts in the daily card-spend mart for July 1.",
     "sql": "SELECT COALESCE(SUM(purchased_minor), 0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-01'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum CAD posted purchase events posted on July 1.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND posted_at < TIMESTAMP '2026-07-02 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum CAD posted purchase events occurring on July 1.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-07-02 00:00:00'",
     "status": "ok",
     "same_as_key": false
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B32",
   "text": "What was gross CAD card spend on 2026-07-31? Return one amount in minor units.",
   "open": true,
   "choices": [
    {
     "kind": "spend source",
     "bank_label": "metric_definition",
     "what_is_open": "Gross spend could use the daily card-spend mart or purchase events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For purchase events, July 31 could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Sum CAD purchased amounts in the daily card-spend mart for July 31.",
     "sql": "SELECT COALESCE(SUM(purchased_minor), 0) FROM card_spend_daily WHERE currency = 'CAD' AND spend_date = DATE '2026-07-31'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Sum CAD posted purchase events posted on July 31.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND posted_at >= TIMESTAMP '2026-07-31 00:00:00' AND posted_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Sum CAD posted purchase events occurring on July 31.",
     "sql": "SELECT COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'posted' AND occurred_at >= TIMESTAMP '2026-07-31 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": false
    }
   ],
   "key_listed": true,
   "moves": true
  },
  {
   "dataset": "banking",
   "id": "B33",
   "text": "For CAD purchase events marked pending at the snapshot and initiated during July 2026, return the event count and total amount in minor units.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count CAD purchase events with snapshot status pending and July occurrence timestamps, and sum their amounts.",
     "sql": "SELECT COUNT(*), COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'pending' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B34",
   "text": "For CAD purchase events marked void at the snapshot and initiated during July 2026, return the event count and total amount in minor units.",
   "open": false,
   "choices": [],
   "readings": [
    {
     "reading": "R1",
     "words": "Count CAD purchase events with snapshot status void and July occurrence timestamps, and sum their amounts.",
     "sql": "SELECT COUNT(*), COALESCE(SUM(amount_minor), 0) FROM transactions WHERE currency = 'CAD' AND event_kind = 'purchase' AND status = 'void' AND occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND occurred_at < TIMESTAMP '2026-08-01 00:00:00'",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B35",
   "text": "Which CAD accounts had no purchases contributing to July 2026 card spend? Return account_id, including accounts with other ledger activity.",
   "open": true,
   "choices": [
    {
     "kind": "purchase source",
     "bank_label": "metric_definition",
     "what_is_open": "Contributing purchases could be identified using daily purchase counts or qualifying purchase events."
    },
    {
     "kind": "reporting date",
     "bank_label": "time_window",
     "what_is_open": "For purchase events, July could refer to posting dates or occurrence dates."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "Return CAD accounts with no positive purchase count in the July daily card-spend mart, regardless of other activity.",
     "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM card_spend_daily s WHERE s.account_id = a.account_id AND s.currency = 'CAD' AND s.spend_date >= DATE '2026-07-01' AND s.spend_date < DATE '2026-08-01' AND s.purchase_count > 0)",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "Return CAD accounts with no CAD posted purchase event posted in July, regardless of other activity.",
     "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.currency = 'CAD' AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00')",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R3",
     "words": "Return CAD accounts with no CAD posted purchase event occurring in July, regardless of other activity.",
     "sql": "SELECT a.account_id FROM accounts a WHERE a.currency = 'CAD' AND NOT EXISTS (SELECT 1 FROM transactions t WHERE t.account_id = a.account_id AND t.currency = 'CAD' AND t.event_kind = 'purchase' AND t.status = 'posted' AND t.occurred_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.occurred_at < TIMESTAMP '2026-08-01 00:00:00')",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  },
  {
   "dataset": "banking",
   "id": "B36",
   "text": "Reconcile July 2026 ledger balances by currency. Return currency, opening balance at July 1, total signed posted movement during July, and closing balance at July 31. Use minor units and include all accounts.",
   "open": true,
   "choices": [
    {
     "kind": "posted-movement source",
     "bank_label": "metric_definition",
     "what_is_open": "July posted movement could come from daily posted-credit and posted-debit totals or from signed posted transaction events."
    }
   ],
   "readings": [
    {
     "reading": "R1",
     "words": "For all accounts by currency, use July 1 daily opening balances, July daily posted credits less debits, and July 31 daily closing balances.",
     "sql": "SELECT a.currency, COALESCE(SUM(CASE WHEN d.balance_date = DATE '2026-07-01' THEN d.opening_minor ELSE 0 END), 0), COALESCE(SUM(d.posted_credit_minor - d.posted_debit_minor), 0), COALESCE(SUM(CASE WHEN d.balance_date = DATE '2026-07-31' THEN d.closing_minor ELSE 0 END), 0) FROM accounts a LEFT JOIN account_daily d ON d.account_id = a.account_id AND d.currency = a.currency AND d.balance_date >= DATE '2026-07-01' AND d.balance_date < DATE '2026-08-01' GROUP BY a.currency",
     "status": "ok",
     "same_as_key": true
    },
    {
     "reading": "R2",
     "words": "For all accounts by currency, use daily opening and closing balances but calculate July movement from transaction credits less debits posted during July.",
     "sql": "WITH balances AS (SELECT a.currency, COALESCE(SUM(CASE WHEN d.balance_date = DATE '2026-07-01' THEN d.opening_minor ELSE 0 END), 0) AS opening_minor, COALESCE(SUM(CASE WHEN d.balance_date = DATE '2026-07-31' THEN d.closing_minor ELSE 0 END), 0) AS closing_minor FROM accounts a LEFT JOIN account_daily d ON d.account_id = a.account_id AND d.currency = a.currency AND d.balance_date IN (DATE '2026-07-01', DATE '2026-07-31') GROUP BY a.currency), movement AS (SELECT t.currency, SUM(CASE WHEN t.direction = 'credit' THEN t.amount_minor ELSE -t.amount_minor END) AS movement_minor FROM transactions t JOIN accounts a ON a.account_id = t.account_id WHERE t.status = 'posted' AND t.posted_at >= TIMESTAMP '2026-07-01 00:00:00' AND t.posted_at < TIMESTAMP '2026-08-01 00:00:00' GROUP BY t.currency) SELECT b.currency, b.opening_minor, COALESCE(m.movement_minor, 0), b.closing_minor FROM balances b LEFT JOIN movement m ON m.currency = b.currency",
     "status": "ok",
     "same_as_key": true
    }
   ],
   "key_listed": true,
   "moves": false
  }
 ],
 "repairs": [],
 "counts": {
  "questions": 91,
  "open": 28,
  "moves": 12,
  "open_and_moves": 12,
  "key_listed": 91,
  "readings": 160,
  "failed": 0
 }
}
