Step 1: Extract the numerical month from the 'date' column then add column 'month' to existing table.
week |
date |
opponent |
result |
attendance |
1 |
1976-09-13 |
miami dolphins |
l 30 - 21 |
77683 |
2 |
1976-09-19 |
houston oilers |
l 13 - 3 |
61384 |
3 |
1976-09-26 |
tampa bay buccaneers |
w 14 - 9 |
44505 |
4 |
1976-10-03 |
kansas city chiefs |
w 50 - 17 |
51909 |
5 |
1976-10-10 |
new york jets |
l 17 - 14 |
59110 |
6 |
1976-10-17 |
baltimore colts |
l 31 - 13 |
71009 |
7 |
1976-10-24 |
new england patriots |
l 26 - 22 |
45144 |
8 |
1976-10-31 |
new york jets |
l 19 - 14 |
41285 |
9 |
1976-11-07 |
new england patriots |
l 20 - 10 |
61157 |
10 |
1976-11-15 |
dallas cowboys |
l 17 - 10 |
51799 |
11 |
1976-11-21 |
san diego chargers |
l 34 - 13 |
36539 |
12 |
1976-11-25 |
detroit lions |
l 27 - 14 |
66875 |
13 |
1976-12-05 |
miami dolphins |
l 45 - 27 |
43475 |
14 |
1976-12-12 |
baltimore colts |
l 58 - 20 |
50451 |
Step 2: Select rows where 'month' is either 11 or 12.
week |
date |
opponent |
result |
attendance |
month |
1 |
1976-09-13 |
miami dolphins |
l 30 - 21 |
77683 |
9 |
2 |
1976-09-19 |
houston oilers |
l 13 - 3 |
61384 |
9 |
3 |
1976-09-26 |
tampa bay buccaneers |
w 14 - 9 |
44505 |
9 |
4 |
1976-10-03 |
kansas city chiefs |
w 50 - 17 |
51909 |
10 |
5 |
1976-10-10 |
new york jets |
l 17 - 14 |
59110 |
10 |
6 |
1976-10-17 |
baltimore colts |
l 31 - 13 |
71009 |
10 |
7 |
1976-10-24 |
new england patriots |
l 26 - 22 |
45144 |
10 |
8 |
1976-10-31 |
new york jets |
l 19 - 14 |
41285 |
10 |
9 |
1976-11-07 |
new england patriots |
l 20 - 10 |
61157 |
11 |
10 |
1976-11-15 |
dallas cowboys |
l 17 - 10 |
51799 |
11 |
11 |
1976-11-21 |
san diego chargers |
l 34 - 13 |
36539 |
11 |
12 |
1976-11-25 |
detroit lions |
l 27 - 14 |
66875 |
11 |
13 |
1976-12-05 |
miami dolphins |
l 45 - 27 |
43475 |
12 |
14 |
1976-12-12 |
baltimore colts |
l 58 - 20 |
50451 |
12 |
Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 2, otherwise return FALSE.
week |
date |
opponent |
result |
attendance |
month |
9 |
1976-11-07 |
new england patriots |
l 20 - 10 |
61157 |
11 |
10 |
1976-11-15 |
dallas cowboys |
l 17 - 10 |
51799 |
11 |
11 |
1976-11-21 |
san diego chargers |
l 34 - 13 |
36539 |
11 |
12 |
1976-11-25 |
detroit lions |
l 27 - 14 |
66875 |
11 |
13 |
1976-12-05 |
miami dolphins |
l 45 - 27 |
43475 |
12 |
14 |
1976-12-12 |
baltimore colts |
l 58 - 20 |
50451 |
12 |
verification_result |
FALSE |