Step 1: Select rows where 'year' is 1987.
year |
chassis |
engine__s |
tyres |
points |
1985 |
zakspeed 841 |
zakspeed s4 t / c |
g |
0 |
1986 |
zakspeed 861 |
zakspeed s4 t / c |
g |
0 |
1987 |
zakspeed 861 zakspeed 871 |
zakspeed s4 t / c |
g |
2 |
1988 |
zakspeed 881 |
zakspeed s4 t / c |
g |
0 |
1989 |
zakspeed 891 |
yamaha v8 |
p |
0 |
Step 2: Extract the number of zakspeed chassis from the 'chassis' column by identifying the number of chassis separated by spaces to add column 'num_chassis' to existing table.
year |
chassis |
engine__s |
tyres |
points |
1987 |
zakspeed 861 zakspeed 871 |
zakspeed s4 t / c |
g |
2 |
Step 3: Select rows where 'num_chassis' is greater than 2.
year |
chassis |
engine__s |
tyres |
points |
num_chassis |
1987 |
zakspeed 861 zakspeed 871 |
zakspeed s4 t / c |
g |
2 |
16 |
Step 4: Use a `CASE` statement to return TRUE if the number of rows is greater than 0, otherwise return FALSE.
year |
chassis |
engine__s |
tyres |
points |
num_chassis |
1987 |
zakspeed 861 zakspeed 871 |
zakspeed s4 t / c |
g |
2 |
16 |
Prediction: TRUE
Ground-truth: FALSE