Step 1: Select rows where 'opponent' is 'green bay packers'.
week |
date |
opponent |
result |
attendance |
1 |
1976-09-12 |
chicago bears |
l 10 - 3 |
54125 |
2 |
1976-09-19 |
atlanta falcons |
w 24 - 10 |
50840 |
3 |
1976-09-26 |
minnesota vikings |
l 10 - 9 |
77292 |
4 |
1976-10-03 |
green bay packers |
l 24 - 14 |
55041 |
5 |
1976-10-10 |
new england patriots |
w 30 - 10 |
60174 |
6 |
1976-10-17 |
washington redskins |
l 20 - 7 |
45908 |
7 |
1976-10-24 |
seattle seahawks |
w 41 - 14 |
61280 |
8 |
1976-10-31 |
green bay packers |
w 27 - 6 |
74992 |
9 |
1976-11-07 |
minnesota vikings |
l 31 - 23 |
46735 |
10 |
1976-11-14 |
new orleans saints |
l 17 - 16 |
42048 |
11 |
1976-11-21 |
chicago bears |
w 14 - 10 |
78042 |
12 |
1976-11-25 |
buffalo bills |
w 27 - 14 |
66875 |
13 |
1976-12-05 |
new york giants |
l 24 - 10 |
66069 |
14 |
1976-12-11 |
los angeles rams |
l 20 - 17 |
73470 |
Step 2: Extract the numerical points scored by the packers from the 'result' column by identifying the number after '-' to add column 'packers_points' to existing table.
week |
date |
opponent |
result |
attendance |
4 |
1976-10-03 |
green bay packers |
l 24 - 14 |
55041 |
8 |
1976-10-31 |
green bay packers |
w 27 - 6 |
74992 |
Step 3: Select rows where 'packers_points' is 6.
week |
date |
opponent |
result |
attendance |
packers_points |
4 |
1976-10-03 |
green bay packers |
l 24 - 14 |
55041 |
14 |
8 |
1976-10-31 |
green bay packers |
w 27 - 6 |
74992 |
6 |
Step 4: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.
week |
date |
opponent |
result |
attendance |
packers_points |
8 |
1976-10-31 |
green bay packers |
w 27 - 6 |
74992 |
6 |
Prediction: TRUE
Ground-truth: FALSE