Plan-of-SQLs (Ours)


Statement: the milwaukee brewers in the 2005 season played cardinals one day before reds

Ground-truth: TRUE

Input Table: 2005 milwaukee brewers season

Step 1: Select rows where 'opponent' is 'reds'.
date opponent score loss attendance record
9999-09-01 padres 5 - 6 davis (1 - 1) 24785 65 - 69
9999-09-02 padres 12 - 2 lawrence (7 - 14) 18231 66 - 69
9999-09-03 padres 1 - 6 obermueller (1 - 3) 32022 66 - 70
9999-09-04 padres 3 - 2 otsuka (1 - 6) 20042 67 - 70
9999-09-05 reds 6 - 1 belisle (3 - 7) 16144 68 - 70
9999-09-06 reds 1 - 2 (10) de la rosa (2 - 2) 13351 68 - 71
9999-09-07 reds 14 - 5 milton (7 - 14) 15886 69 - 71
9999-09-09 astros 7 - 4 clemens (11 - 7) 18130 70 - 71
9999-09-10 astros 5 - 7 ohka (10 - 8) 24437 70 - 72
9999-09-11 astros 4 - 2 oswalt (17 - 12) 17392 71 - 72
9999-09-13 diamondbacks 3 - 1 vã¡zquez (10 - 15) 23708 72 - 72
9999-09-14 diamondbacks 1 - 2 (12) lehr (0 - 1) 23793 72 - 73
9999-09-15 diamondbacks 14 - 2 estes (7 - 8) 20741 73 - 73
9999-09-16 astros 1 - 2 eveland (1 - 1) 33767 73 - 74
9999-09-17 astros 0 - 7 obermueller (1 - 4) 37756 73 - 75
9999-09-18 astros 1 - 6 capuano (17 - 10) 35052 73 - 76
9999-09-20 cubs 5 - 3 williams (5 - 9) 30136 74 - 76
9999-09-21 cubs 7 - 6 van buren (0 - 2) 30049 75 - 76
9999-09-22 cubs 0 - 3 helling (2 - 1) 31137 75 - 77
9999-09-23 cardinals 9 - 6 carpenter (21 - 5) 22472 76 - 77
9999-09-24 cardinals 8 - 7 mulder (16 - 8) 33506 77 - 77
9999-09-25 cardinals 0 - 2 davis (11 - 11) 20150 77 - 78
9999-09-26 reds 12 - 9 coffey (4 - 1) 14412 78 - 78
9999-09-27 reds 6 - 2 claussen (10 - 10) 28031 79 - 78
9999-09-28 reds 4 - 11 capuano (18 - 11) 21181 79 - 79
9999-09-29 reds 2 - 0 milton (8 - 15) 13173 80 - 79
9999-09-30 pirates 6 - 5 vogelsong (2 - 2) 20922 81 - 79

Step 2: Extract the date from the 'date' column to add column 'game_date' to existing table.
date opponent score loss attendance record
9999-09-05 reds 6 - 1 belisle (3 - 7) 16144 68 - 70
9999-09-06 reds 1 - 2 (10) de la rosa (2 - 2) 13351 68 - 71
9999-09-07 reds 14 - 5 milton (7 - 14) 15886 69 - 71
9999-09-26 reds 12 - 9 coffey (4 - 1) 14412 78 - 78
9999-09-27 reds 6 - 2 claussen (10 - 10) 28031 79 - 78
9999-09-28 reds 4 - 11 capuano (18 - 11) 21181 79 - 79
9999-09-29 reds 2 - 0 milton (8 - 15) 13173 80 - 79

Step 3: Select rows where 'game_date' is one day before the date of the game against the 'reds'.
date opponent score loss attendance record game_date
9999-09-05 reds 6 - 1 belisle (3 - 7) 16144 68 - 70 9999-09-05
9999-09-06 reds 1 - 2 (10) de la rosa (2 - 2) 13351 68 - 71 9999-09-06
9999-09-07 reds 14 - 5 milton (7 - 14) 15886 69 - 71 9999-09-07
9999-09-26 reds 12 - 9 coffey (4 - 1) 14412 78 - 78 9999-09-26
9999-09-27 reds 6 - 2 claussen (10 - 10) 28031 79 - 78 9999-09-27
9999-09-28 reds 4 - 11 capuano (18 - 11) 21181 79 - 79 9999-09-28
9999-09-29 reds 2 - 0 milton (8 - 15) 13173 80 - 79 9999-09-29

Step 4: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.
date opponent score loss attendance record game_date

Final output table:
verification_result
FALSE

Prediction: FALSE

Ground-truth: TRUE