{"id": "q001", "question": "In the practice_attempts table, what is the total of duration_seconds during January 2025 (rows whose timestamp is on or after 2025-01-01 and strictly before 2025-02-01)? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-01-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-02-01 00:00:00'", "expected_answer": 500000.0, "answer_type": "number", "tags": ["aggregation", "temporal_window", "single_table"], "source": {"kind": "outcome_curve_period", "table": "practice_attempts", "column": "duration_seconds", "period": "date:2025-01-01T00:00:00"}, "round_decimals": 2} {"id": "q002", "question": "In the practice_attempts table, what is the total of duration_seconds during February 2025 (rows whose timestamp is on or after 2025-02-01 and strictly before 2025-03-01)? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-02-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-03-01 00:00:00'", "expected_answer": 520000.0, "answer_type": "number", "tags": ["aggregation", "temporal_window", "single_table"], "source": {"kind": "outcome_curve_period", "table": "practice_attempts", "column": "duration_seconds", "period": "date:2025-02-01T00:00:00"}, "round_decimals": 2} {"id": "q003", "question": "In the practice_attempts table, what is the total of duration_seconds during March 2025 (rows whose timestamp is on or after 2025-03-01 and strictly before 2025-04-01)? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-03-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-04-01 00:00:00'", "expected_answer": 540000.0, "answer_type": "number", "tags": ["aggregation", "temporal_window", "single_table"], "source": {"kind": "outcome_curve_period", "table": "practice_attempts", "column": "duration_seconds", "period": "date:2025-03-01T00:00:00"}, "round_decimals": 2} {"id": "q004", "question": "In the practice_attempts table, what is the total of duration_seconds during April 2025 (rows whose timestamp is on or after 2025-04-01 and strictly before 2025-05-01)? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-04-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-05-01 00:00:00'", "expected_answer": 560000.0, "answer_type": "number", "tags": ["aggregation", "temporal_window", "single_table"], "source": {"kind": "outcome_curve_period", "table": "practice_attempts", "column": "duration_seconds", "period": "date:2025-04-01T00:00:00"}, "round_decimals": 2} {"id": "q005", "question": "In the practice_attempts table, what is the total of duration_seconds during May 2025 (rows whose timestamp is on or after 2025-05-01 and strictly before 2025-06-01)? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-05-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-06-01 00:00:00'", "expected_answer": 580000.0, "answer_type": "number", "tags": ["aggregation", "temporal_window", "single_table"], "source": {"kind": "outcome_curve_period", "table": "practice_attempts", "column": "duration_seconds", "period": "date:2025-05-01T00:00:00"}, "round_decimals": 2} {"id": "q006", "question": "In the practice_attempts table, what is the total of duration_seconds during June 2025 (rows whose timestamp is on or after 2025-06-01 and strictly before 2025-07-01)? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-06-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-07-01 00:00:00'", "expected_answer": 600000.0, "answer_type": "number", "tags": ["aggregation", "temporal_window", "single_table"], "source": {"kind": "outcome_curve_period", "table": "practice_attempts", "column": "duration_seconds", "period": "date:2025-06-01T00:00:00"}, "round_decimals": 2} {"id": "q007", "question": "In the practice_attempts table, what is the total of duration_seconds across all rows whose attempted_at is on or after 2025-01-01 and strictly before 2025-07-01? Give a number rounded to 2 decimal places.", "gold_sql": "SELECT ROUND(SUM(\"duration_seconds\"), 2) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-01-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-07-01 00:00:00'", "expected_answer": 3300000.0, "answer_type": "number", "tags": ["aggregation", "single_table"], "source": {"kind": "outcome_curve_total", "table": "practice_attempts", "column": "duration_seconds"}, "round_decimals": 2} {"id": "q008", "question": "How many rows does the practice_attempts table contain during January 2025 (rows whose timestamp is on or after 2025-01-01 and strictly before 2025-02-01)? Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-01-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-02-01 00:00:00'", "expected_answer": 2273, "answer_type": "integer", "tags": ["count", "temporal_window", "single_table"], "source": {"kind": "plan_row_count", "table": "practice_attempts", "period": "date:2025-01-01T00:00:00"}} {"id": "q009", "question": "How many rows does the practice_attempts table contain during February 2025 (rows whose timestamp is on or after 2025-02-01 and strictly before 2025-03-01)? Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-02-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-03-01 00:00:00'", "expected_answer": 2364, "answer_type": "integer", "tags": ["count", "temporal_window", "single_table"], "source": {"kind": "plan_row_count", "table": "practice_attempts", "period": "date:2025-02-01T00:00:00"}} {"id": "q010", "question": "How many rows does the practice_attempts table contain during March 2025 (rows whose timestamp is on or after 2025-03-01 and strictly before 2025-04-01)? Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-03-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-04-01 00:00:00'", "expected_answer": 2455, "answer_type": "integer", "tags": ["count", "temporal_window", "single_table"], "source": {"kind": "plan_row_count", "table": "practice_attempts", "period": "date:2025-03-01T00:00:00"}} {"id": "q011", "question": "How many rows does the practice_attempts table contain during April 2025 (rows whose timestamp is on or after 2025-04-01 and strictly before 2025-05-01)? Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-04-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-05-01 00:00:00'", "expected_answer": 2545, "answer_type": "integer", "tags": ["count", "temporal_window", "single_table"], "source": {"kind": "plan_row_count", "table": "practice_attempts", "period": "date:2025-04-01T00:00:00"}} {"id": "q012", "question": "How many rows does the practice_attempts table contain during May 2025 (rows whose timestamp is on or after 2025-05-01 and strictly before 2025-06-01)? Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-05-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-06-01 00:00:00'", "expected_answer": 2636, "answer_type": "integer", "tags": ["count", "temporal_window", "single_table"], "source": {"kind": "plan_row_count", "table": "practice_attempts", "period": "date:2025-05-01T00:00:00"}} {"id": "q013", "question": "How many rows does the practice_attempts table contain during June 2025 (rows whose timestamp is on or after 2025-06-01 and strictly before 2025-07-01)? Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-06-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-07-01 00:00:00'", "expected_answer": 2727, "answer_type": "integer", "tags": ["count", "temporal_window", "single_table"], "source": {"kind": "plan_row_count", "table": "practice_attempts", "period": "date:2025-06-01T00:00:00"}} {"id": "q014", "question": "Which calendar month (format YYYY-MM) has the highest total of duration_seconds in the practice_attempts table? If several months tie, answer the earliest one.", "gold_sql": "SELECT strftime(date_trunc('month', \"attempted_at\"), '%Y-%m') AS period FROM \"practice_attempts\" GROUP BY 1 ORDER BY SUM(\"duration_seconds\") DESC, 1 ASC LIMIT 1", "expected_answer": "2025-06", "answer_type": "string", "tags": ["aggregation", "argmax", "group_by", "single_table"], "source": {"kind": "outcome_curve_argmax", "table": "practice_attempts", "column": "duration_seconds"}} {"id": "q017", "question": "In the practice_attempts table, what fraction of rows during March 2025 (rows whose timestamp is on or after 2025-03-01 and strictly before 2025-04-01) have correct equal to True? Give a number rounded to 4 decimal places.", "gold_sql": "SELECT ROUND(AVG(CASE WHEN \"correct\" = TRUE THEN 1.0 ELSE 0.0 END), 4) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-03-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-04-01 00:00:00'", "expected_answer": 0.602, "answer_type": "number", "tags": ["rate", "temporal_window", "single_table"], "source": {"kind": "rate_curve_anchor", "table": "practice_attempts", "column": "correct", "period": "2025-03"}, "round_decimals": 4} {"id": "q019", "question": "In the practice_attempts table, what fraction of rows during May 2025 (rows whose timestamp is on or after 2025-05-01 and strictly before 2025-06-01) have correct equal to True? Give a number rounded to 4 decimal places.", "gold_sql": "SELECT ROUND(AVG(CASE WHEN \"correct\" = TRUE THEN 1.0 ELSE 0.0 END), 4) FROM \"practice_attempts\" WHERE \"attempted_at\" >= TIMESTAMP '2025-05-01 00:00:00' AND \"attempted_at\" < TIMESTAMP '2025-06-01 00:00:00'", "expected_answer": 0.654, "answer_type": "number", "tags": ["rate", "temporal_window", "single_table"], "source": {"kind": "rate_curve_anchor", "table": "practice_attempts", "column": "correct", "period": "2025-05"}, "round_decimals": 4} {"id": "q021", "question": "How many rows in the practice_attempts table have a student_id value that does not appear in the student_id column of the students table? Count NULL student_id values as matching. Give an integer.", "gold_sql": "SELECT COUNT(*) FROM \"practice_attempts\" c LEFT JOIN \"students\" p ON c.\"student_id\" = p.\"student_id\" WHERE p.\"student_id\" IS NULL AND c.\"student_id\" IS NOT NULL", "expected_answer": 0, "answer_type": "integer", "tags": ["join", "integrity", "multi_table"], "source": {"kind": "fk_integrity", "relationship": "practice_attempts.student_id -> students.student_id"}}