Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: cannons is the opponent on july 14 at bishop kearney field

Table: 2005 philadelphia barrage season

date opponent home___away field result
9999-05-29 cannons home villanova stadium l 12 - 13
9999-06-04 lizards home villanova stadium l 14 - 19
9999-06-12 bayhawks away johnny unitas stadium l 9 - 31
9999-06-18 pride away alumni stadium (kean university) w 11 - 10
9999-06-25 lizards away mitchel athletic complex l 12 - 18
9999-06-30 cannons away nickerson field w 15 - 14
9999-07-09 rattlers away bishop kearney field w 26 - 15
9999-07-14 rattlers home villanova stadium l 10 - 14
9999-07-23 cannons away nickerson field l 10 - 11
9999-07-28 lizards home villanova stadium w 16 - 14
9999-08-04 bayhawks home villanova stadium l 9 - 19
9999-08-11 pride home villanova stadium l 12 - 16
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'opponent' is 'cannons'.

Step 2: Select rows where 'date' is '9999-07-14'.

Step 3: Select rows where 'field' is 'bishop kearney field'.

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

Step 1: Select rows where 'opponent' is 'cannons'.

SQL command for the step:

SELECT * FROM table_sql WHERE opponent = 'cannons';
date opponent home___away field result
9999-05-29 cannons home villanova stadium l 12 - 13
9999-06-04 lizards home villanova stadium l 14 - 19
9999-06-12 bayhawks away johnny unitas stadium l 9 - 31
9999-06-18 pride away alumni stadium (kean university) w 11 - 10
9999-06-25 lizards away mitchel athletic complex l 12 - 18
9999-06-30 cannons away nickerson field w 15 - 14
9999-07-09 rattlers away bishop kearney field w 26 - 15
9999-07-14 rattlers home villanova stadium l 10 - 14
9999-07-23 cannons away nickerson field l 10 - 11
9999-07-28 lizards home villanova stadium w 16 - 14
9999-08-04 bayhawks home villanova stadium l 9 - 19
9999-08-11 pride home villanova stadium l 12 - 16

Step 2: Select rows where 'date' is '9999-07-14'.

SQL command for the step:

SELECT * FROM table_sql WHERE date = '9999-07-14';
date opponent home___away field result
9999-05-29 cannons home villanova stadium l 12 - 13
9999-06-30 cannons away nickerson field w 15 - 14
9999-07-23 cannons away nickerson field l 10 - 11

Step 3: Select rows where 'field' is 'bishop kearney field'.

SQL command for the step:

SELECT * FROM table_sql WHERE field = 'bishop kearney field';
date opponent home___away field result

Step 4: 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;
date opponent home___away field result

Verification:

The statement is FALSE