Step 1: Select rows where 'league' is 'belgian cup'.
player |
league |
title_playoff |
super_cup |
total |
mbark boussoufa |
11 |
0 |
0 |
11 |
tom de sutter |
9 |
0 |
0 |
9 |
guillaume gillet |
8 |
0 |
0 |
9 |
marcin wasilewski |
8 |
0 |
0 |
8 |
jonathan legear |
5 |
1 |
0 |
7 |
nicolás frutos |
6 |
0 |
0 |
6 |
thomas chatelle |
4 |
0 |
0 |
4 |
roland juhász |
4 |
0 |
0 |
4 |
stanislav vlček |
4 |
0 |
0 |
4 |
lucas biglia |
2 |
0 |
0 |
3 |
dmitri bulykin |
3 |
0 |
0 |
3 |
jan polák |
2 |
0 |
0 |
3 |
matías suárez |
1 |
0 |
1 |
3 |
jelle van damme |
3 |
0 |
0 |
3 |
oleksandr iakovenko |
2 |
0 |
0 |
2 |
hernán losada |
1 |
0 |
0 |
2 |
víctor bernárdez |
1 |
0 |
0 |
1 |
bart goor |
1 |
0 |
0 |
1 |
nemanja rnić |
0 |
0 |
0 |
1 |
Step 2: Order the table by 'player' in ascending order.
player |
league |
title_playoff |
super_cup |
total |
Step 3: Select rows where 'player' is 'jonathan legear'.
player |
league |
title_playoff |
super_cup |
total |
Step 4: Extract the sum of 'total' column values for all players except 'jonathan legear' then add column 'sum_total' to existing table.
player |
league |
title_playoff |
super_cup |
total |
Step 5: Select rows where 'sum_total' is less than the value in the 'total' column for 'jonathan legear'.
player |
league |
title_playoff |
super_cup |
total |
sum_total |
Step 6: Use a `CASE` statement to return TRUE if the number of rows is equal to 0, otherwise return FALSE.
player |
league |
title_playoff |
super_cup |
total |
sum_total |