Step 1: Order the table by 'points' in ascending order.
rank |
name |
nation |
sp___fs |
points |
places |
1 |
mark cockerell |
united states |
1 |
172.42 |
11.0 |
2 |
takashi mura |
japan |
2 |
165.7 |
24.0 |
3 |
brian pockar |
canada |
3 |
166.62 |
23.0 |
4 |
norbert schramm |
west germany |
4 |
159.8 |
40.0 |
5 |
andrew bestwick |
united kingdom |
5 |
158.1 |
48.0 |
6 |
stephan bril |
west germany |
7 |
155.72 |
57.0 |
7 |
patrice macrez |
france |
6 |
151.76 |
71.0 |
8 |
pierre lamine |
france |
8 |
150.5 |
79.0 |
9 |
shinji someya |
japan |
10 |
150.34 |
74.5 |
10 |
jozef sabovčík |
czechoslovakia |
9 |
148.88 |
87.0 |
11 |
daniel fuerer |
switzerland |
13 |
146.18 |
92.5 |
12 |
gerald schranz |
austria |
11 |
143.04 |
102.0 |
13 |
helmut kristofics - binder |
austria |
15 |
137.32 |
123.0 |
14 |
michael pasfield |
australia |
12 |
136.6 |
119.0 |
15 |
francis demarteau |
belgium |
14 |
131.02 |
140.0 |
16 |
adrian vasile |
romania |
16 |
127.74 |
143.0 |
17 |
miljan begovic |
yugoslavia |
17 |
127.3 |
143.0 |
18 |
jeremy dowson |
south africa |
18 |
114.98 |
166.0 |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
Step 2: Select row number 1.
rank |
name |
nation |
sp___fs |
points |
places |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
18 |
jeremy dowson |
south africa |
18 |
114.98 |
166.0 |
17 |
miljan begovic |
yugoslavia |
17 |
127.3 |
143.0 |
16 |
adrian vasile |
romania |
16 |
127.74 |
143.0 |
15 |
francis demarteau |
belgium |
14 |
131.02 |
140.0 |
14 |
michael pasfield |
australia |
12 |
136.6 |
119.0 |
13 |
helmut kristofics - binder |
austria |
15 |
137.32 |
123.0 |
12 |
gerald schranz |
austria |
11 |
143.04 |
102.0 |
11 |
daniel fuerer |
switzerland |
13 |
146.18 |
92.5 |
10 |
jozef sabovčík |
czechoslovakia |
9 |
148.88 |
87.0 |
9 |
shinji someya |
japan |
10 |
150.34 |
74.5 |
8 |
pierre lamine |
france |
8 |
150.5 |
79.0 |
7 |
patrice macrez |
france |
6 |
151.76 |
71.0 |
6 |
stephan bril |
west germany |
7 |
155.72 |
57.0 |
5 |
andrew bestwick |
united kingdom |
5 |
158.1 |
48.0 |
4 |
norbert schramm |
west germany |
4 |
159.8 |
40.0 |
2 |
takashi mura |
japan |
2 |
165.7 |
24.0 |
3 |
brian pockar |
canada |
3 |
166.62 |
23.0 |
1 |
mark cockerell |
united states |
1 |
172.42 |
11.0 |
Step 3: Extract the numerical value from the 'points' column then add column 'min_points' to existing table.
rank |
name |
nation |
sp___fs |
points |
places |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
Step 4: Order the table by 'points' in descending order.
rank |
name |
nation |
sp___fs |
points |
places |
min_points |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
114 |
Step 5: Select row number 1.
rank |
name |
nation |
sp___fs |
points |
places |
min_points |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
114 |
Step 6: Extract the numerical value from the 'points' column then add column 'max_points' to existing table.
rank |
name |
nation |
sp___fs |
points |
places |
min_points |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
114 |
Step 7: Calculate the difference between 'max_points' and 'min_points' and add column 'point_diff' to existing table.
rank |
name |
nation |
sp___fs |
points |
places |
min_points |
max_points |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
114 |
114 |
Step 8: Select rows where 'point_diff' is less than 50.
rank |
name |
nation |
sp___fs |
points |
places |
min_points |
max_points |
point_diff |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
114 |
114 |
0 |
Step 9: Use a `CASE` statement to return TRUE if the number of rows is greater than or equal to 1, otherwise return FALSE.
rank |
name |
nation |
sp___fs |
points |
places |
min_points |
max_points |
point_diff |
19 |
marc franquet |
belgium |
19 |
114.38 |
167.0 |
114 |
114 |
0 |