Step 1: Select rows where 'opponent' is 'david ross'.
res |
record |
opponent |
method |
event |
round |
time |
loss |
7 - 6 - 1 |
kimo leopoldo |
tko (broken toe) |
wfa 2: level 2 |
1 |
1:55 |
loss |
7 - 5 - 1 |
marcelo tigre |
tko (punches) |
pancrase - 2001 anniversary show |
1 |
1:34 |
win |
7 - 4 - 1 |
osami shibuya |
decision (unanimous) |
pancrase - 2001 neo - blood tournament second round |
3 |
5:00 |
win |
6 - 4 - 1 |
kengo watanabe |
ko (punches) |
pancrase - proof 2 |
1 |
3:23 |
loss |
5 - 4 - 1 |
jeff monson |
decision |
ufc 27 |
2 |
5:00 |
loss |
5 - 3 - 1 |
gan mcgee |
submission (strikes) |
ifc wc 7 - warriors challenge 7 |
1 |
4:38 |
win |
5 - 2 - 1 |
joe campanella |
tko |
ifc wc 7 - warriors challenge 7 |
1 |
0:18 |
loss |
4 - 2 - 1 |
borislav jeliazkov |
submission (rear naked choke) |
rings : king of kings 1999 block b |
1 |
2:23 |
draw |
4 - 1 - 1 |
ron waterman |
draw |
ufc 22 |
3 |
5:00 |
loss |
4 - 1 |
tsuyoshi kohsaka |
tko (corner stoppage) |
ufc 21 |
2 |
5:00 |
win |
4 - 0 |
mark tullius |
submission (strikes) |
ng 9 - neutral grounds 9 |
1 |
6:58 |
win |
3 - 0 |
eugene jackson |
submission (rear naked choke) |
ifc wc 2 - warriors challenge 2 |
1 |
9:49 |
win |
2 - 0 |
david ross |
tko |
ifc wc 2 - warriors challenge 2 |
1 |
5:36 |
win |
1 - 0 |
paul devich |
tko |
ifc wc 2 - warriors challenge 2 |
1 |
1:20 |
Step 2: Extract the numerical value of 'time' by splitting the string using ':' and converting the values to seconds. Add a column 'seconds' to the existing table.
res |
record |
opponent |
method |
event |
round |
time |
win |
2 - 0 |
david ross |
tko |
ifc wc 2 - warriors challenge 2 |
1 |
5:36 |
Step 3: Cast to INT and order the table by 'seconds' in descending order and select the first row.
res |
record |
opponent |
method |
event |
round |
time |
seconds |
win |
2 - 0 |
david ross |
tko |
ifc wc 2 - warriors challenge 2 |
1 |
5:36 |
336 |
Step 4: Select rows where 'res' is 'win'.
res |
record |
opponent |
method |
event |
round |
time |
seconds |
win |
2 - 0 |
david ross |
tko |
ifc wc 2 - warriors challenge 2 |
1 |
5:36 |
336 |
Step 5: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.
res |
record |
opponent |
method |
event |
round |
time |
seconds |
win |
2 - 0 |
david ross |
tko |
ifc wc 2 - warriors challenge 2 |
1 |
5:36 |
336 |
Prediction: TRUE
Ground-truth: FALSE