{
 "written_from": "question text alone, before the second author readings were opened",
 "excluded": [],
 "questions_file_sha256": "6f6cc15a64a4fee7016df1afcd765bc406566c3e51503bc30dfe2591f66f5b69",
 "keys": [
  {
   "id": "B01",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips",
   "key_rows": 1,
   "key_sha256": "52b4a1c9b287b689e153dddc4c1204fdbc1dc6e962948db9ac4543649c69e73d",
   "covered": true,
   "metric_query": {
    "metrics": [
     "trip_count"
    ]
   }
  },
  {
   "id": "B02",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT ROUND(SUM(fare), 2) AS fare_revenue FROM trips",
   "key_rows": 1,
   "key_sha256": "807a7f96772617703683dd769b99fc14acdd340889d6ce2c36cb57fe4a9d9499",
   "covered": true,
   "metric_query": {
    "metrics": [
     "total_fare"
    ]
   }
  },
  {
   "id": "B03",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT ROUND(AVG(fare), 2) AS avg_fare FROM trips WHERE fare IS NOT NULL",
   "key_rows": 1,
   "key_sha256": "56c630966da52795e626d2ea9ff8723c465d363adf3debeb891d63bfc2c94b3a",
   "covered": false,
   "not_covered_reason": "the question asks for a rounded value; a metric query cannot round"
  },
  {
   "id": "B04",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT ROUND(AVG(trip_seconds) / 60.0, 2) AS avg_minutes FROM trips",
   "key_rows": 1,
   "key_sha256": "bf418d6ac35784f561b2ef6b6c3eddc08d313a23030237120ceab4ab8d92da6f",
   "covered": false,
   "not_covered_reason": "the question asks for a rounded value; a metric query cannot round"
  },
  {
   "id": "B05",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT SUM(trip_miles) AS miles FROM trips",
   "key_rows": 1,
   "key_sha256": "8ccbb785500510e7d22061ab6145dac2136a5403765606d4f94c75c117e36016",
   "covered": true,
   "metric_query": {
    "metrics": [
     "total_miles"
    ]
   }
  },
  {
   "id": "B06",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips WHERE tip > 0",
   "key_rows": 1,
   "key_sha256": "68066232f4be82e8c482630f92fd795aa73d3f343462957e42669cafb1386fb4",
   "covered": false,
   "not_covered_reason": "no metric or dimension for the tip amount, so trips with a positive tip cannot be selected"
  },
  {
   "id": "B07",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips WHERE fare IS NULL",
   "key_rows": 1,
   "key_sha256": "bea0e0959fc3488f007700fe40dfdcfd4cdd9c91c817fac17f25df5ef4063846",
   "covered": false,
   "not_covered_reason": "no metric counts missing fares, and a metric query cannot subtract one metric from another"
  },
  {
   "id": "B08",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips WHERE trip_miles > 10",
   "key_rows": 1,
   "key_sha256": "611d396218e87dd5bbcb662ee864227870f440b5f166c1895340ffc1b0503196",
   "covered": false,
   "not_covered_reason": "no dimension for trip distance, so trips over 10 miles cannot be selected"
  },
  {
   "id": "B09",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips WHERE shared_trip_match",
   "key_rows": 1,
   "key_sha256": "de0c07a6ce6c0f248407a39e57dc61ba1a6572aaa9c78f64db05ad31fa48d028",
   "covered": true,
   "metric_query": {
    "metrics": [
     "shared_matched_count"
    ]
   }
  },
  {
   "id": "B10",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips WHERE shared_trip_match AND shared_trip_authorized = FALSE",
   "key_rows": 1,
   "key_sha256": "39fcb52cf444ecca51a4eb1391a2e58fab10bf4aa154101609d6930e0fa9d710",
   "covered": true,
   "metric_query": {
    "metrics": [
     "trip_count"
    ],
    "filters": [
     {
      "dimension": "trip__shared_trip_match",
      "operator": "=",
      "value": true
     },
     {
      "dimension": "trip__shared_trip_authorized",
      "operator": "=",
      "value": false
     }
    ]
   }
  },
  {
   "id": "B11",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT COUNT(*) AS trips FROM trips WHERE pickup_zone_id = dropoff_zone_id AND pickup_zone_id <> 0",
   "key_rows": 1,
   "key_sha256": "a448d240ffc7b8b79b1ba05fc69c3bb717a20ce776db8f7d06667ea6c8d49906",
   "covered": false,
   "not_covered_reason": "a filter cannot compare the pickup zone with the dropoff zone"
  },
  {
   "id": "B12",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "simple",
   "key_sql": "SELECT MAX(trip_total) AS largest_total FROM trips",
   "key_rows": 1,
   "key_sha256": "0db3fb2365c2d3854a53b6dcaae2db640549f7cbdc865f52f55ffc666e948633",
   "covered": false,
   "not_covered_reason": "no maximum metric and no metric for the total rider payment"
  },
  {
   "id": "B13",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT trip_date, COUNT(*) AS trips FROM trips GROUP BY 1 ORDER BY 1",
   "key_rows": 31,
   "key_sha256": "450167a737afa5a1faaf35b3077309ce5bd05df8a5c0644dd800c723fb99d45d",
   "covered": true,
   "metric_query": {
    "metrics": [
     "trip_count"
    ],
    "group_by": [
     "metric_time"
    ],
    "order_by": [
     "metric_time"
    ]
   }
  },
  {
   "id": "B14",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT trip_date, COUNT(fare) AS fares, ROUND(AVG(fare), 2) AS avg_fare FROM trips GROUP BY 1 ORDER BY 1",
   "key_rows": 31,
   "key_sha256": "0fea00085c4b6bb316e4aa5ea3f63cc14724fb48d6f01c66c6e04c3fd0498e1e",
   "covered": false,
   "not_covered_reason": "no metric counts recorded fares, and a metric query cannot round"
  },
  {
   "id": "B15",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT DATE_TRUNC('week', trip_date) AS week_monday, COUNT(*) AS trips FROM trips GROUP BY 1 ORDER BY 1",
   "key_rows": 5,
   "key_sha256": "a1db94368a74557a2c41c0059f661c359b5286bc490cc796203ee64caedd348b",
   "covered": false,
   "not_covered_reason": "no weekly time grain among the dimensions"
  },
  {
   "id": "B16",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT EXTRACT(isodow FROM trip_date) AS weekday, COUNT(*) AS trips FROM trips GROUP BY 1 ORDER BY trips DESC, weekday",
   "key_rows": 7,
   "key_sha256": "8e6bb1115f05d793eff475c8940d67b966bae3d66e5b0b2bdb9ccda24994cadb",
   "covered": false,
   "not_covered_reason": "no weekday dimension"
  },
  {
   "id": "B17",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT pickup_zone_id, COUNT(*) AS trips FROM trips GROUP BY 1 ORDER BY trips DESC, pickup_zone_id LIMIT 10",
   "key_rows": 10,
   "key_sha256": "c66658e6d10c225d490fb52ccc545d8624147eec7209d6829e77604b0f5e7653",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension (zone names only), and a metric query has no row limit"
  },
  {
   "id": "B18",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT dropoff_zone_id, COUNT(*) AS trips FROM trips WHERE dropoff_zone_id <> 0 GROUP BY 1 ORDER BY trips DESC, dropoff_zone_id LIMIT 10",
   "key_rows": 10,
   "key_sha256": "e18bfae005ff35df0644e44c35535f742035a9484fca7646ed6b1fd3c1d0ca0b",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension, and a metric query has no row limit"
  },
  {
   "id": "B19",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT shared_trip_match, COUNT(*) AS trips, COUNT(fare) AS fares, ROUND(AVG(fare), 2) AS avg_fare FROM trips WHERE shared_trip_match IS NOT NULL GROUP BY 1 ORDER BY 1",
   "key_rows": 2,
   "key_sha256": "3d320357cb096547cc9e715fe6eb670f36ae78394498f915d366d358da2f556a",
   "covered": false,
   "not_covered_reason": "no metric counts recorded fares, and a metric query cannot round"
  },
  {
   "id": "B20",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT shared_trip_authorized, COUNT(*) AS trips, SUM(CASE WHEN shared_trip_match THEN 1 ELSE 0 END) AS shared FROM trips WHERE shared_trip_authorized IS NOT NULL GROUP BY 1 ORDER BY 1",
   "key_rows": 2,
   "key_sha256": "6fabc462099e1cb5c874eba9ec8e62c34f2b9a219facd435652c40985a16b920",
   "covered": true,
   "metric_query": {
    "metrics": [
     "trip_count",
     "shared_matched_count"
    ],
    "group_by": [
     "trip__shared_trip_authorized"
    ],
    "order_by": [
     "trip__shared_trip_authorized"
    ]
   }
  },
  {
   "id": "B21",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT shared_trip_authorized, shared_trip_match, COUNT(*) AS trips FROM trips WHERE shared_trip_authorized IS NOT NULL AND shared_trip_match IS NOT NULL GROUP BY 1, 2 ORDER BY 1, 2",
   "key_rows": 4,
   "key_sha256": "2b5c85f629a5c6c24eed5a900b59eecd9ead3692b839cdbb34e8eaa674f0113f",
   "covered": true,
   "metric_query": {
    "metrics": [
     "trip_count"
    ],
    "group_by": [
     "trip__shared_trip_authorized",
     "trip__shared_trip_match"
    ],
    "order_by": [
     "trip__shared_trip_authorized",
     "trip__shared_trip_match"
    ]
   }
  },
  {
   "id": "B22",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT trip_date, COUNT(*) AS trips, SUM(trip_miles) AS miles FROM trips GROUP BY 1 ORDER BY 1",
   "key_rows": 31,
   "key_sha256": "314cb2326bb83e3c3cc3577e6a55b4171d2e7a4facf9ddd1f143c47ad4293c60",
   "covered": true,
   "metric_query": {
    "metrics": [
     "trip_count",
     "total_miles"
    ],
    "group_by": [
     "metric_time"
    ],
    "order_by": [
     "metric_time"
    ]
   }
  },
  {
   "id": "B23",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT EXTRACT(isodow FROM trip_date) AS weekday, ROUND(AVG(trip_seconds) / 60.0, 2) AS avg_minutes FROM trips GROUP BY 1 ORDER BY 1",
   "key_rows": 7,
   "key_sha256": "d29742bf9a1a7f5d19144e7d62d2cbde962d3c0eaca00263684b562f3e6663d0",
   "covered": false,
   "not_covered_reason": "no weekday dimension, and a metric query cannot round"
  },
  {
   "id": "B24",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT pickup_zone_id, COUNT(trip_miles) AS trips, ROUND(AVG(trip_miles), 2) AS avg_miles FROM trips WHERE pickup_zone_id <> 0 GROUP BY 1 HAVING COUNT(trip_miles) >= 20 ORDER BY AVG(trip_miles) DESC, pickup_zone_id LIMIT 10",
   "key_rows": 10,
   "key_sha256": "58e4e02a887fe1a43f711079ee84660831923bfed949ffc06ddd82f3cd59aabb",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension, no rounding, no minimum-count filter on a metric, no row limit"
  },
  {
   "id": "B25",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "SELECT CASE WHEN EXTRACT(isodow FROM trip_date) IN (6, 7) THEN 'Weekend' ELSE 'Weekday' END AS day_type, COUNT(*) AS trips, COUNT(trip_total) AS totals, ROUND(AVG(trip_total), 2) AS avg_total FROM trips GROUP BY 1 ORDER BY 1",
   "key_rows": 2,
   "key_sha256": "eebcacc8b3b44794963c55455d246d8893bf178e68bb119d55a5b5ba05286fb5",
   "covered": false,
   "not_covered_reason": "no weekday or weekend dimension, no metric for the total rider payment, no rounding"
  },
  {
   "id": "B26",
   "answer_type": "table",
   "ordered": true,
   "kind": "grouped",
   "key_sql": "WITH b AS (SELECT CASE WHEN trip_miles IS NULL THEN 'Mileage missing' WHEN trip_miles < 3 THEN 'Under 3 miles' WHEN trip_miles < 10 THEN '3 to under 10 miles' ELSE '10 miles or more' END AS band, CASE WHEN trip_miles IS NULL THEN 4 WHEN trip_miles < 3 THEN 1 WHEN trip_miles < 10 THEN 2 ELSE 3 END AS k FROM trips) SELECT band, COUNT(*) AS trips FROM b GROUP BY band, k ORDER BY k",
   "key_rows": 3,
   "key_sha256": "6eab3ba1f139258893d8d401c4554513e652b17c3b7ec7138cfd70372703d651",
   "covered": false,
   "not_covered_reason": "no dimension for trip distance bands"
  },
  {
   "id": "B27",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "SELECT t.pickup_zone_id, z.zone_name, COUNT(*) AS trips FROM trips t JOIN zones z ON z.zone_id = t.pickup_zone_id GROUP BY 1, 2 ORDER BY trips DESC, z.zone_name, t.pickup_zone_id LIMIT 10",
   "key_rows": 10,
   "key_sha256": "5db021062ca3c4ac8b92ba1cd61371d2020284ef83717de47a2d5e8ecbf52383",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension, and a metric query has no row limit"
  },
  {
   "id": "B28",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "SELECT t.pickup_zone_id, p.zone_name, t.dropoff_zone_id, d.zone_name, COUNT(*) AS trips FROM trips t JOIN zones p ON p.zone_id = t.pickup_zone_id JOIN zones d ON d.zone_id = t.dropoff_zone_id WHERE t.pickup_zone_id <> 0 AND t.dropoff_zone_id <> 0 GROUP BY 1, 2, 3, 4 ORDER BY trips DESC, t.pickup_zone_id, t.dropoff_zone_id LIMIT 10",
   "key_rows": 10,
   "key_sha256": "6f0aaabb0d9edd7d3676a91e3d60c86e5fa8e75f8e14ca6c0935708750a55f08",
   "covered": false,
   "not_covered_reason": "the zone numbers are not dimensions, and a metric query has no row limit"
  },
  {
   "id": "B29",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH a AS (SELECT pickup_zone_id, COUNT(*) AS n, SUM(CASE WHEN shared_trip_match THEN 1 ELSE 0 END) AS m FROM trips WHERE shared_trip_authorized AND pickup_zone_id <> 0 GROUP BY 1) SELECT a.pickup_zone_id, z.zone_name, n, m, ROUND(100.0 * m / n, 2) AS pct FROM a JOIN zones z ON z.zone_id = a.pickup_zone_id WHERE n >= 20 ORDER BY 100.0 * m / n DESC, a.pickup_zone_id",
   "key_rows": 6,
   "key_sha256": "4e19e9a1683ba487935ac8e6a098ed53a4091ad680a6dc29d9aa48aff7f716a3",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension, no minimum-count filter on a metric, no percentage or rounding"
  },
  {
   "id": "B30",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "harder",
   "key_sql": "SELECT ROUND(100.0 * SUM(CASE WHEN shared_trip_authorized = FALSE THEN 1 ELSE 0 END) / NULLIF(COUNT(*), 0), 2) AS pct FROM trips WHERE shared_trip_match",
   "key_rows": 1,
   "key_sha256": "57cbbb953bce75dcbf944c9690a9ed25ef26b94f40edb91df6a192516ff7de86",
   "covered": false,
   "not_covered_reason": "a metric query cannot compute a share within a filtered group or round it"
  },
  {
   "id": "B31",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "SELECT z.zone_id, z.zone_name, COUNT(t.trip_id) AS pickups FROM zones z LEFT JOIN trips t ON t.pickup_zone_id = z.zone_id GROUP BY 1, 2 ORDER BY 1",
   "key_rows": 78,
   "key_sha256": "521679b604b8dd429a77f60297f09609511e3e5dd44225836a5a186119078e03",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension"
  },
  {
   "id": "B32",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH d AS (SELECT trip_date, COUNT(*) AS n, SUM(CASE WHEN shared_trip_match THEN 1 ELSE 0 END) AS m FROM trips GROUP BY 1) SELECT trip_date, n, m, ROUND(100.0 * m / n, 2) AS pct FROM d WHERE n >= 50 ORDER BY 100.0 * m / n DESC, trip_date LIMIT 5",
   "key_rows": 5,
   "key_sha256": "95cfe225d76ceeae7fda3c3df0d359548abfc86a24a5fd2ce745123454620904",
   "covered": false,
   "not_covered_reason": "no minimum-count filter on a metric, no percentage or rounding, no row limit"
  },
  {
   "id": "B33",
   "answer_type": "scalar",
   "ordered": false,
   "kind": "harder",
   "key_sql": "SELECT ROUND(AVG(CASE WHEN shared_trip_match THEN fare END) - AVG(CASE WHEN shared_trip_match = FALSE THEN fare END), 2) AS difference FROM trips",
   "key_rows": 1,
   "key_sha256": "f16131412cf35fcabfed7bca88851eeec60c59a429be825f234f20549ee94c5a",
   "covered": false,
   "not_covered_reason": "a metric query cannot subtract one group from another"
  },
  {
   "id": "B34",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH o AS (SELECT AVG(fare) AS overall FROM trips), a AS (SELECT pickup_zone_id, COUNT(fare) AS n, AVG(fare) AS avg_fare FROM trips WHERE pickup_zone_id <> 0 GROUP BY 1) SELECT a.pickup_zone_id, z.zone_name, n, ROUND(avg_fare, 2) AS area_avg, ROUND(o.overall, 2) AS overall_avg FROM a CROSS JOIN o JOIN zones z ON z.zone_id = a.pickup_zone_id WHERE n >= 20 AND avg_fare > o.overall ORDER BY avg_fare DESC, a.pickup_zone_id",
   "key_rows": 6,
   "key_sha256": "7b1ac8e39afe6c01531ce83c6f67d63f2633831993218e40d730a8f155c1ee67",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension, and a metric query cannot compare an area with the overall average"
  },
  {
   "id": "B35",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH a AS (SELECT pickup_zone_id, COUNT(*) AS n, SUM(tip) AS tips, SUM(trip_total) AS totals FROM trips WHERE tip IS NOT NULL AND trip_total IS NOT NULL AND pickup_zone_id <> 0 GROUP BY 1) SELECT a.pickup_zone_id, z.zone_name, n, ROUND(100.0 * tips / totals, 2) AS tip_pct FROM a JOIN zones z ON z.zone_id = a.pickup_zone_id WHERE totals > 0 ORDER BY 100.0 * tips / totals DESC, a.pickup_zone_id",
   "key_rows": 77,
   "key_sha256": "869962c2188e1b2d219232e3bd8e0978d5ee71f29b096c28803d7f483baa80c3",
   "covered": false,
   "not_covered_reason": "no metric for the total rider payment, no percentage, no zone number"
  },
  {
   "id": "B36",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH a AS (SELECT pickup_zone_id, SUM(nonmissing_fares) AS n, SUM(total_fare) AS f FROM daily_trips GROUP BY 1) SELECT a.pickup_zone_id, z.zone_name, n, ROUND(f / n, 2) AS avg_fare FROM a JOIN zones z ON z.zone_id = a.pickup_zone_id WHERE n >= 100 ORDER BY f / n DESC, a.pickup_zone_id",
   "key_rows": 21,
   "key_sha256": "32d57fa9156c83cf455a6a7a14a96b757364763180b52ce3727cc6e7555d4d75",
   "covered": false,
   "not_covered_reason": "the zone number is not a dimension, no minimum-count filter on a metric, no rounding"
  },
  {
   "id": "B37",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH t AS (SELECT trip_date, COUNT(*) AS n FROM trips GROUP BY 1), s AS (SELECT trip_date, SUM(trip_count) AS n FROM daily_trips GROUP BY 1) SELECT t.trip_date, t.n AS detailed, COALESCE(s.n, 0) AS summarized, t.n - COALESCE(s.n, 0) AS difference FROM t LEFT JOIN s ON s.trip_date = t.trip_date ORDER BY 1",
   "key_rows": 31,
   "key_sha256": "8baef13fa8a3964f139e7fc56e803e0b332c113bc6a0e447cd3c547ba0325378",
   "covered": false,
   "not_covered_reason": "a metric query cannot compare the summary table with the trips table"
  },
  {
   "id": "B38",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH w AS (SELECT DATE_TRUNC('week', trip_date) AS week_monday, COALESCE(SUM(fare), 0) AS revenue FROM trips GROUP BY 1), o AS (SELECT SUM(fare) AS total FROM trips) SELECT week_monday, revenue, ROUND(100.0 * revenue / o.total, 2) AS pct FROM w CROSS JOIN o ORDER BY 1",
   "key_rows": 5,
   "key_sha256": "f60b35a5b24c29a1539edbff9ac543ff40de9b8c825fbd1c6162bdfd74cec911",
   "covered": false,
   "not_covered_reason": "no weekly time grain, and a metric query cannot compute a share of the total"
  },
  {
   "id": "B39",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH p AS (SELECT pickup_zone_id AS zone_id, COUNT(*) AS n FROM trips GROUP BY 1), d AS (SELECT dropoff_zone_id AS zone_id, COUNT(*) AS n FROM trips GROUP BY 1) SELECT z.zone_id, z.zone_name, COALESCE(p.n, 0) AS pickups, COALESCE(d.n, 0) AS dropoffs, COALESCE(p.n, 0) - COALESCE(d.n, 0) AS difference FROM zones z LEFT JOIN p ON p.zone_id = z.zone_id LEFT JOIN d ON d.zone_id = z.zone_id WHERE z.zone_id <> 0 AND COALESCE(p.n, 0) > COALESCE(d.n, 0) ORDER BY difference DESC, z.zone_id",
   "key_rows": 43,
   "key_sha256": "62d695019a8761703281ddcece9aa481e0e12fd4e5abc7b3905f2a1c95d8e16e",
   "covered": false,
   "not_covered_reason": "no pickup-minus-dropoff comparison, no zone number"
  },
  {
   "id": "B40",
   "answer_type": "table",
   "ordered": true,
   "kind": "harder",
   "key_sql": "WITH c AS (SELECT pickup_zone_id, trip_date, SUM(trip_count) AS n FROM daily_trips GROUP BY 1, 2), m AS (SELECT pickup_zone_id, MAX(n) AS top FROM c GROUP BY 1), b AS (SELECT c.pickup_zone_id, MIN(c.trip_date) AS busiest, MAX(c.n) AS n FROM c JOIN m ON m.pickup_zone_id = c.pickup_zone_id AND c.n = m.top GROUP BY 1) SELECT b.pickup_zone_id, z.zone_name, b.busiest, b.n FROM b JOIN zones z ON z.zone_id = b.pickup_zone_id ORDER BY 1",
   "key_rows": 78,
   "key_sha256": "53fcf0625ebada37265f0ef8c0060f61973c757785dd4fe7d1ba3ad6dde9aa7b",
   "covered": false,
   "not_covered_reason": "no busiest-date selection per zone, no zone number"
  }
 ]
}
