Step 1: Order the table by the visitor's score in ascending order.
date |
visitor |
score |
home |
decision |
attendance |
record |
0002-01-01 |
detroit |
4 - 1 |
carolina |
joseph |
17053 |
24 - 12 - 4 - 1 |
0001-01-03 |
anaheim |
1 - 3 |
detroit |
legace |
20066 |
25 - 12 - 4 - 1 |
0000-01-05 |
nashville |
0 - 6 |
detroit |
joseph |
20066 |
26 - 12 - 4 - 1 |
0001-01-07 |
boston |
3 - 0 |
detroit |
joseph |
20066 |
26 - 13 - 4 - 1 |
0000-01-10 |
detroit |
1 - 2 |
boston |
joseph |
17565 |
26 - 13 - 4 - 2 |
9999-01-14 |
chicago |
2 - 4 |
detroit |
legace |
20066 |
27 - 13 - 4 - 2 |
0000-01-16 |
phoenix |
3 - 3 |
detroit |
joseph |
20066 |
27 - 13 - 5 - 2 |
9999-01-19 |
detroit |
1 - 2 |
san jose |
joseph |
17361 |
27 - 14 - 5 - 2 |
9999-01-21 |
detroit |
2 - 2 |
anaheim |
legace |
17174 |
27 - 14 - 6 - 2 |
9999-01-22 |
detroit |
5 - 4 |
los angeles |
joseph |
18118 |
28 - 14 - 6 - 2 |
9999-01-24 |
detroit |
2 - 5 |
phoenix |
joseph |
19019 |
28 - 15 - 6 - 2 |
9999-01-26 |
detroit |
2 - 2 |
dallas |
legace |
18532 |
28 - 15 - 7 - 2 |
9999-01-29 |
new jersey |
2 - 5 |
detroit |
joseph |
20066 |
29 - 15 - 7 - 2 |
9999-01-31 |
carolina |
4 - 4 |
detroit |
legace |
20066 |
30 - 15 - 8 - 2 |
Step 2: Select the row number 1.
date |
visitor |
score |
home |
decision |
attendance |
record |
0000-01-05 |
nashville |
0 - 6 |
detroit |
joseph |
20066 |
26 - 12 - 4 - 1 |
0001-01-03 |
anaheim |
1 - 3 |
detroit |
legace |
20066 |
25 - 12 - 4 - 1 |
0000-01-10 |
detroit |
1 - 2 |
boston |
joseph |
17565 |
26 - 13 - 4 - 2 |
9999-01-19 |
detroit |
1 - 2 |
san jose |
joseph |
17361 |
27 - 14 - 5 - 2 |
9999-01-14 |
chicago |
2 - 4 |
detroit |
legace |
20066 |
27 - 13 - 4 - 2 |
9999-01-21 |
detroit |
2 - 2 |
anaheim |
legace |
17174 |
27 - 14 - 6 - 2 |
9999-01-24 |
detroit |
2 - 5 |
phoenix |
joseph |
19019 |
28 - 15 - 6 - 2 |
9999-01-26 |
detroit |
2 - 2 |
dallas |
legace |
18532 |
28 - 15 - 7 - 2 |
9999-01-29 |
new jersey |
2 - 5 |
detroit |
joseph |
20066 |
29 - 15 - 7 - 2 |
0001-01-07 |
boston |
3 - 0 |
detroit |
joseph |
20066 |
26 - 13 - 4 - 1 |
0000-01-16 |
phoenix |
3 - 3 |
detroit |
joseph |
20066 |
27 - 13 - 5 - 2 |
0002-01-01 |
detroit |
4 - 1 |
carolina |
joseph |
17053 |
24 - 12 - 4 - 1 |
9999-01-31 |
carolina |
4 - 4 |
detroit |
legace |
20066 |
30 - 15 - 8 - 2 |
9999-01-22 |
detroit |
5 - 4 |
los angeles |
joseph |
18118 |
28 - 14 - 6 - 2 |
Step 3: Select rows where the visitor is 'detroit'.
date |
visitor |
score |
home |
decision |
attendance |
record |
0000-01-05 |
nashville |
0 - 6 |
detroit |
joseph |
20066 |
26 - 12 - 4 - 1 |
Step 4: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.
date |
visitor |
score |
home |
decision |
attendance |
record |
verification_result |
FALSE |