Step 1: Select rows where 'record' is in the format 'X - Y', where X and Y are the number of wins and losses respectively.
game |
date |
team |
score |
high_points |
high_rebounds |
high_assists |
location_attendance |
record |
47 |
01-02-9999 |
portland |
l 79 - 98 (ot) |
raymond felton (23) |
gerald wallace (10) |
stephen jackson (4) |
rose garden 20106 |
24 - 23 |
48 |
9999-02-03 |
la lakers |
l 97 - 99 (ot) |
stephen jackson (30) |
nazr mohammed (17) |
boris diaw (5) |
staples center 18997 |
24 - 24 |
49 |
9999-02-06 |
new orleans |
l 99 - 104 (ot) |
stephen jackson (26) |
boris diaw (8) |
raymond felton (7) |
time warner cable arena 19164 |
24 - 25 |
50 |
9999-02-09 |
washington |
w 94 - 92 (ot) |
stephen jackson (22) |
nazr mohammed (10) |
raymond felton (5) |
time warner cable arena 12376 |
25 - 25 |
51 |
01-02-10 |
minnesota |
w 93 - 92 (ot) |
stephen jackson (33) |
nazr mohammed (20) |
dj augustin (7) |
target center 13352 |
26 - 25 |
52 |
01-02-16 |
new jersey |
l 94 - 103 (ot) |
gerald wallace (21) |
gerald wallace , boris diaw (10) |
stephen jackson (5) |
time warner cable arena 13712 |
26 - 26 |
53 |
9999-02-19 |
cleveland |
w 110 - 93 (ot) |
stephen jackson (29) |
tyrus thomas (12) |
boris diaw (9) |
time warner cable arena 19568 |
27 - 26 |
54 |
9999-02-20 |
milwaukee |
l 88 - 93 (ot) |
stephen jackson (35) |
tyrus thomas (11) |
stephen jackson (5) |
bradley center 17174 |
27 - 27 |
55 |
9999-02-22 |
la clippers |
l 94 - 98 (ot) |
gerald wallace (32) |
gerald wallace (12) |
boris diaw , raymond felton (9) |
staples center 15892 |
27 - 28 |
56 |
9999-02-24 |
utah |
l 93 - 102 (ot) |
gerald wallace (27) |
gerald wallace (8) |
raymond felton (5) |
energysolutions arena 19911 |
27 - 29 |
Step 2: Extract the number of wins and losses from the 'record' column to add columns 'wins' and 'losses' to the existing table.
game |
date |
team |
score |
high_points |
high_rebounds |
high_assists |
location_attendance |
record |
47 |
01-02-9999 |
portland |
l 79 - 98 (ot) |
raymond felton (23) |
gerald wallace (10) |
stephen jackson (4) |
rose garden 20106 |
24 - 23 |
48 |
9999-02-03 |
la lakers |
l 97 - 99 (ot) |
stephen jackson (30) |
nazr mohammed (17) |
boris diaw (5) |
staples center 18997 |
24 - 24 |
49 |
9999-02-06 |
new orleans |
l 99 - 104 (ot) |
stephen jackson (26) |
boris diaw (8) |
raymond felton (7) |
time warner cable arena 19164 |
24 - 25 |
50 |
9999-02-09 |
washington |
w 94 - 92 (ot) |
stephen jackson (22) |
nazr mohammed (10) |
raymond felton (5) |
time warner cable arena 12376 |
25 - 25 |
51 |
01-02-10 |
minnesota |
w 93 - 92 (ot) |
stephen jackson (33) |
nazr mohammed (20) |
dj augustin (7) |
target center 13352 |
26 - 25 |
52 |
01-02-16 |
new jersey |
l 94 - 103 (ot) |
gerald wallace (21) |
gerald wallace , boris diaw (10) |
stephen jackson (5) |
time warner cable arena 13712 |
26 - 26 |
53 |
9999-02-19 |
cleveland |
w 110 - 93 (ot) |
stephen jackson (29) |
tyrus thomas (12) |
boris diaw (9) |
time warner cable arena 19568 |
27 - 26 |
54 |
9999-02-20 |
milwaukee |
l 88 - 93 (ot) |
stephen jackson (35) |
tyrus thomas (11) |
stephen jackson (5) |
bradley center 17174 |
27 - 27 |
55 |
9999-02-22 |
la clippers |
l 94 - 98 (ot) |
gerald wallace (32) |
gerald wallace (12) |
boris diaw , raymond felton (9) |
staples center 15892 |
27 - 28 |
56 |
9999-02-24 |
utah |
l 93 - 102 (ot) |
gerald wallace (27) |
gerald wallace (8) |
raymond felton (5) |
energysolutions arena 19911 |
27 - 29 |
Step 3: Use a `CASE` statement to return TRUE if the number of rows where 'wins' is greater than 'losses' is greater than the number of rows where 'wins' is less than 'losses', otherwise return FALSE.
game |
date |
team |
score |
high_points |
high_rebounds |
high_assists |
location_attendance |
record |
wins |
losses |
47 |
01-02-9999 |
portland |
l 79 - 98 (ot) |
raymond felton (23) |
gerald wallace (10) |
stephen jackson (4) |
rose garden 20106 |
24 - 23 |
24 |
23 |
48 |
9999-02-03 |
la lakers |
l 97 - 99 (ot) |
stephen jackson (30) |
nazr mohammed (17) |
boris diaw (5) |
staples center 18997 |
24 - 24 |
24 |
24 |
49 |
9999-02-06 |
new orleans |
l 99 - 104 (ot) |
stephen jackson (26) |
boris diaw (8) |
raymond felton (7) |
time warner cable arena 19164 |
24 - 25 |
24 |
25 |
50 |
9999-02-09 |
washington |
w 94 - 92 (ot) |
stephen jackson (22) |
nazr mohammed (10) |
raymond felton (5) |
time warner cable arena 12376 |
25 - 25 |
25 |
25 |
51 |
01-02-10 |
minnesota |
w 93 - 92 (ot) |
stephen jackson (33) |
nazr mohammed (20) |
dj augustin (7) |
target center 13352 |
26 - 25 |
26 |
25 |
52 |
01-02-16 |
new jersey |
l 94 - 103 (ot) |
gerald wallace (21) |
gerald wallace , boris diaw (10) |
stephen jackson (5) |
time warner cable arena 13712 |
26 - 26 |
26 |
26 |
53 |
9999-02-19 |
cleveland |
w 110 - 93 (ot) |
stephen jackson (29) |
tyrus thomas (12) |
boris diaw (9) |
time warner cable arena 19568 |
27 - 26 |
27 |
26 |
54 |
9999-02-20 |
milwaukee |
l 88 - 93 (ot) |
stephen jackson (35) |
tyrus thomas (11) |
stephen jackson (5) |
bradley center 17174 |
27 - 27 |
27 |
27 |
55 |
9999-02-22 |
la clippers |
l 94 - 98 (ot) |
gerald wallace (32) |
gerald wallace (12) |
boris diaw , raymond felton (9) |
staples center 15892 |
27 - 28 |
27 |
28 |
56 |
9999-02-24 |
utah |
l 93 - 102 (ot) |
gerald wallace (27) |
gerald wallace (8) |
raymond felton (5) |
energysolutions arena 19911 |
27 - 29 |
27 |
29 |
Final output table:
verification_result |
FALSE |
Prediction: FALSE