Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: the time value for the rider brian finch , team suzuki and a rank greater than 3 is 2:14.59.0

Table: 1970 isle of man tt

rank rider team speed time
1 frank whiteway suzuki 89.94 mph 2:05.52.0
2 gordon pantall triumph 88.90 mph 2:07.20.0
3 ray knight triumph 88.89 mph 2:07.20.4
4 rbaylie triumph 87.58 mph 2:09.15.0
5 graham penny triumph 86.70 mph 2:10.34.4
6 jwade suzuki 85.31 mph 2:12.42.0
7 brian finch velocette 83.86 mph 2:14.59.0
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'rider' is 'brian finch'.

Step 2: Select rows where 'team' is 'suzuki'.

Step 3: Select rows where 'rank' is greater than 3.

Step 4: Select rows where 'time' is '2:14.59.0'.

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

Step 1: Select rows where 'rider' is 'brian finch'.

SQL command for the step:

SELECT * FROM table_sql WHERE rider = 'brian finch';
rank rider team speed time
1 frank whiteway suzuki 89.94 mph 2:05.52.0
2 gordon pantall triumph 88.90 mph 2:07.20.0
3 ray knight triumph 88.89 mph 2:07.20.4
4 rbaylie triumph 87.58 mph 2:09.15.0
5 graham penny triumph 86.70 mph 2:10.34.4
6 jwade suzuki 85.31 mph 2:12.42.0
7 brian finch velocette 83.86 mph 2:14.59.0

Step 2: Select rows where 'team' is 'suzuki'.

SQL command for the step:

SELECT * FROM table_sql WHERE team = 'suzuki';
rank rider team speed time
7 brian finch velocette 83.86 mph 2:14.59.0

Step 3: Select rows where 'rank' is greater than 3.

SQL command for the step:

SELECT * FROM table_sql WHERE rank > 3;
rank rider team speed time

Step 4: Select rows where 'time' is '2:14.59.0'.

SQL command for the step:

SELECT * FROM table_sql WHERE time = '2:14.59.0';
rank rider team speed time

Step 5: 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;
rank rider team speed time

Verification:

The statement is FALSE