Plan-of-SQLs Interface TP

Task: Verify the Statement against the Table

Statement: there are no games that have rebounds larger than 1048

Table: none

rank player years games reb_avg total_rebounds
1 jim nowers 1972-01-01 - 1976-01-01 112 9.4 1048
2 kenny sanders 1985-01-01 - 1989-01-01 107 9.6 1026
3 will thomas 2004-01-01 - 2008-01-01 131 7.6 993
4 george evans 1997-01-01 - 2001-01-01 116 8.2 953
5 robert dykes 1987-01-01 - 1991-01-01 122 7.5 925
6 andre gaddy 1977-01-01 - 1982-01-01 98 9.3 916
7 jai lewis 2002-01-01 - 2006-01-01 125 7.2 895
8 rob rose 1982-01-01 - 1986-01-01 113 7.1 805
9 herb estes 1973-01-01 - 1976-01-01 80 9.2 734
10 jesse young 1999-01-01 - 2003-01-01 115 6.2 708
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'total_rebounds' is larger than 1048.

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

Step 1: Select rows where 'total_rebounds' is larger than 1048.

SQL command for the step:

SELECT * FROM table_sql WHERE total_rebounds > 1048;
rank player years games reb_avg total_rebounds
1 jim nowers 1972-01-01 - 1976-01-01 112 9.4 1048
2 kenny sanders 1985-01-01 - 1989-01-01 107 9.6 1026
3 will thomas 2004-01-01 - 2008-01-01 131 7.6 993
4 george evans 1997-01-01 - 2001-01-01 116 8.2 953
5 robert dykes 1987-01-01 - 1991-01-01 122 7.5 925
6 andre gaddy 1977-01-01 - 1982-01-01 98 9.3 916
7 jai lewis 2002-01-01 - 2006-01-01 125 7.2 895
8 rob rose 1982-01-01 - 1986-01-01 113 7.1 805
9 herb estes 1973-01-01 - 1976-01-01 80 9.2 734
10 jesse young 1999-01-01 - 2003-01-01 115 6.2 708

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

SQL command for the step:

SELECT CASE WHEN COUNT(*) = 0 THEN TRUE ELSE FALSE END AS verification FROM table_sql;
rank player years games reb_avg total_rebounds

Verification:

The statement is TRUE