Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: there were four differnt games where no goals were scored by either side

Table: 2000 - 01 sheffield wednesday f.c. season

date opponent venue result attendance
2000-08-13 wolverhampton wanderers a 1 - 1 19086
2000-08-19 huddersfield town h 2 - 3 22704
2000-08-26 grimsby town a 1 - 0 7755
2000-08-28 blackburn rovers h 1 - 1 15646
2000-09-09 wimbledon h 0 - 5 15856
2000-09-13 nottingham forest h 0 - 1 15700
2000-09-16 tranmere rovers a 0 - 2 9352
2000-09-23 preston north end h 1 - 3 17379
2000-09-30 gillingham a 0 - 2 9099
2000-10-08 west bromwich albion h 1 - 2 15338
2000-10-14 portsmouth a 1 - 2 13376
2000-10-17 burnley a 0 - 1 16372
2000-10-22 birmingham city h 1 - 0 14695
2000-10-25 queens park rangers a 2 - 1 10353
2000-10-28 fulham h 3 - 3 17559
2000-11-04 crystal palace a 1 - 4 15333
2000-11-07 watford a 3 - 1 11166
2000-11-01 norwich city h 3 - 2 16956
2000-11-18 barnsley a 0 - 1 19989
2000-11-25 crewe alexandra a 0 - 1 7103
2000-12-02 queens park rangers h 5 - 2 21782
2000-12-09 stockport county h 2 - 4 16337
2000-12-16 sheffield united a 1 - 1 25156
2000-12-23 wolverhampton wanderers h 0 - 1 17787
2000-12-26 bolton wanderers a 0 - 2 21316
2000-12-30 huddersfield town a 0 - 0 18931
2001-01-01 grimsby town h 1 - 0 17004
2001-01-13 blackburn rovers a 0 - 2 19308
2001-01-20 bolton wanderers h 0 - 3 17638
2001-02-03 watford h 2 - 3 16134
2001-02-10 wimbledon a 1 - 4 6741
2001-02-13 tranmere rovers h 1 - 0 15444
2001-02-21 nottingham forest a 1 - 0 23266
2001-02-24 preston north end a 0 - 2 14379
2001-03-03 gillingham h 2 - 1 18702
2001-03-07 portsmouth h 0 - 0 20503
2001-03-10 west bromwich albion a 2 - 1 18662
2001-03-17 burnley h 2 - 0 20184
2001-03-24 birmingham city a 2 - 1 19733
2001-04-01 sheffield united h 1 - 2 38433
2001-04-07 stockport county a 1 - 2 9666
2001-04-14 crystal palace h 4 - 1 19877
2001-04-16 fulham a 1 - 1 17500
2001-04-21 barnsley h 2 - 1 23498
2001-04-28 norwich city a 0 - 1 21241
2001-05-06 crewe alexandra h 0 - 0 28007
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'result' is '0 - 0'.

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

Step 1: Select rows where 'result' is '0 - 0'.

SQL command for the step:

SELECT * FROM table_sql WHERE result = '0 - 0';
date opponent venue result attendance
2000-08-13 wolverhampton wanderers a 1 - 1 19086
2000-08-19 huddersfield town h 2 - 3 22704
2000-08-26 grimsby town a 1 - 0 7755
2000-08-28 blackburn rovers h 1 - 1 15646
2000-09-09 wimbledon h 0 - 5 15856
2000-09-13 nottingham forest h 0 - 1 15700
2000-09-16 tranmere rovers a 0 - 2 9352
2000-09-23 preston north end h 1 - 3 17379
2000-09-30 gillingham a 0 - 2 9099
2000-10-08 west bromwich albion h 1 - 2 15338
2000-10-14 portsmouth a 1 - 2 13376
2000-10-17 burnley a 0 - 1 16372
2000-10-22 birmingham city h 1 - 0 14695
2000-10-25 queens park rangers a 2 - 1 10353
2000-10-28 fulham h 3 - 3 17559
2000-11-04 crystal palace a 1 - 4 15333
2000-11-07 watford a 3 - 1 11166
2000-11-01 norwich city h 3 - 2 16956
2000-11-18 barnsley a 0 - 1 19989
2000-11-25 crewe alexandra a 0 - 1 7103
2000-12-02 queens park rangers h 5 - 2 21782
2000-12-09 stockport county h 2 - 4 16337
2000-12-16 sheffield united a 1 - 1 25156
2000-12-23 wolverhampton wanderers h 0 - 1 17787
2000-12-26 bolton wanderers a 0 - 2 21316
2000-12-30 huddersfield town a 0 - 0 18931
2001-01-01 grimsby town h 1 - 0 17004
2001-01-13 blackburn rovers a 0 - 2 19308
2001-01-20 bolton wanderers h 0 - 3 17638
2001-02-03 watford h 2 - 3 16134
2001-02-10 wimbledon a 1 - 4 6741
2001-02-13 tranmere rovers h 1 - 0 15444
2001-02-21 nottingham forest a 1 - 0 23266
2001-02-24 preston north end a 0 - 2 14379
2001-03-03 gillingham h 2 - 1 18702
2001-03-07 portsmouth h 0 - 0 20503
2001-03-10 west bromwich albion a 2 - 1 18662
2001-03-17 burnley h 2 - 0 20184
2001-03-24 birmingham city a 2 - 1 19733
2001-04-01 sheffield united h 1 - 2 38433
2001-04-07 stockport county a 1 - 2 9666
2001-04-14 crystal palace h 4 - 1 19877
2001-04-16 fulham a 1 - 1 17500
2001-04-21 barnsley h 2 - 1 23498
2001-04-28 norwich city a 0 - 1 21241
2001-05-06 crewe alexandra h 0 - 0 28007

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

SQL command for the step:

SELECT CASE WHEN COUNT(*) = 4 THEN TRUE ELSE FALSE END AS verification FROM table_sql;
date opponent venue result attendance
2000-12-30 huddersfield town a 0 - 0 18931
2001-03-07 portsmouth h 0 - 0 20503
2001-05-06 crewe alexandra h 0 - 0 28007

Verification:

The statement is FALSE