Plan-of-SQLs Interface TP

Task: Verify the Statement against the Table

Statement: in the 1987 - 88 season , newell 's old boys scored 55 points

Table: 1988 - 89 argentine primera división

team average points played c_1986___87 c_1987___88 c_1988___89
independiente 1.219 139 114 47 37 55
newell 's old boys 1.193 136 114 48 55 33
san lorenzo 1.184 135 114 44 49 42
racing club 1.158 132 114 44 48 40
boca juniors 1.14 130 114 46 35 49
river plate 1.14 130 114 39 46 45
rosario central 1.079 123 114 49 40 34
deportivo español 1.07 122 114 36 40 46
gimnasia de la plata 1.018 116 114 37 43 36
vélez sársfield 1.009 115 114 41 41 33
estudiantes de la plata 0.974 111 114 37 32 42
argentinos juniors 0.965 110 114 28 40 42
talleres de córdoba 0.956 109 114 38 27 44
ferro carril oeste 0.939 107 114 44 33 30
deportivo mandiyú 0.868 33 38 n / a n / a 33
platense 0.86 98 114 27 38 33
instituto de córdoba 0.851 97 114 41 33 23
racing de córdoba 0.851 97 114 33 31 33
san martín de tucumán 0.842 32 38 n / a n / a 32
deportivo armenio 0.776 59 76 n / a 34 25
Generating plan to answer the query...

Generated steps

Step 1: Select rows where the 'c_1987___88' column is equal to 55.

Step 2: Select rows where the 'team' column is 'newell 's old boys'.

Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.

Step 1: Select rows where the 'c_1987___88' column is equal to 55.

SQL command for the step:

SELECT * FROM table_sql WHERE c_1987___88 = 55;
team average points played c_1986___87 c_1987___88 c_1988___89
independiente 1.219 139 114 47 37 55
newell 's old boys 1.193 136 114 48 55 33
san lorenzo 1.184 135 114 44 49 42
racing club 1.158 132 114 44 48 40
boca juniors 1.14 130 114 46 35 49
river plate 1.14 130 114 39 46 45
rosario central 1.079 123 114 49 40 34
deportivo español 1.07 122 114 36 40 46
gimnasia de la plata 1.018 116 114 37 43 36
vélez sársfield 1.009 115 114 41 41 33
estudiantes de la plata 0.974 111 114 37 32 42
argentinos juniors 0.965 110 114 28 40 42
talleres de córdoba 0.956 109 114 38 27 44
ferro carril oeste 0.939 107 114 44 33 30
deportivo mandiyú 0.868 33 38 n / a n / a 33
platense 0.86 98 114 27 38 33
instituto de córdoba 0.851 97 114 41 33 23
racing de córdoba 0.851 97 114 33 31 33
san martín de tucumán 0.842 32 38 n / a n / a 32
deportivo armenio 0.776 59 76 n / a 34 25

Step 2: Select rows where the 'team' column is 'newell 's old boys'.

SQL command for the step:

SELECT * FROM table_sql WHERE team = 'newell ''s old boys';
team average points played c_1986___87 c_1987___88 c_1988___89
newell 's old boys 1.193 136 114 48 55 33

Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.

SQL command for the step:

SELECT CASE WHEN COUNT(*) = 1 THEN TRUE ELSE FALSE END AS verification FROM table_sql;
team average points played c_1986___87 c_1987___88 c_1988___89
newell 's old boys 1.193 136 114 48 55 33

Verification:

The statement is TRUE