Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: before october 15 , carrier dome 11747 was the location attendance where will bynum (5) did the high assists played

Table: 2010 - 11 detroit pistons season

game date team score high_points high_rebounds high_assists location_attendance record
1 9999-10-05 miami l 89 - 105 (ot) ben gordon (17) ben gordon , charlie villanueva (5) rodney stuckey (5) american airlines arena 19600 0 - 1
2 9999-10-08 milwaukee w 115 - 110 (ot) austin daye (21) austin daye (7) will bynum (9) the palace of auburn hills 12821 1 - 1
3 9999-10-11 atlanta w 94 - 85 (ot) rodney stuckey (16) greg monroe (7) richard hamilton (7) the palace of auburn hills 10591 2 - 1
4 9999-10-13 dallas l 96 - 101 (ot) austin daye (16) ben wallace , jason maxiell (8) rodney stuckey (6) van andel arena 10207 2 - 2
5 9999-10-15 minnesota l 88 - 99 (ot) austin daye (18) austin daye (11) will bynum (5) carrier dome 11747 2 - 3
6 9999-10-16 charlotte l 94 - 97 (ot) rodney stuckey (25) greg monroe (8) rodney stuckey , will bynum (5) colonial life arena 6847 2 - 4
7 9999-10-19 washington w 98 - 92 (ot) rodney stuckey (34) ben wallace (11) rodney stuckey (7) huntington center 6424 3 - 4
Generating plan to answer the query...

Generated steps

Step 1: Select rows where the 'date' is before October 15.

Step 2: Select rows where the 'location_attendance' is 'carrier dome 11747'.

Step 3: Select rows where the 'high_assists' is 'will bynum (5)'.

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 the 'date' is before October 15.

SQL command for the step:

SELECT * FROM table_sql WHERE date < '2023-10-15';
game date team score high_points high_rebounds high_assists location_attendance record
1 9999-10-05 miami l 89 - 105 (ot) ben gordon (17) ben gordon , charlie villanueva (5) rodney stuckey (5) american airlines arena 19600 0 - 1
2 9999-10-08 milwaukee w 115 - 110 (ot) austin daye (21) austin daye (7) will bynum (9) the palace of auburn hills 12821 1 - 1
3 9999-10-11 atlanta w 94 - 85 (ot) rodney stuckey (16) greg monroe (7) richard hamilton (7) the palace of auburn hills 10591 2 - 1
4 9999-10-13 dallas l 96 - 101 (ot) austin daye (16) ben wallace , jason maxiell (8) rodney stuckey (6) van andel arena 10207 2 - 2
5 9999-10-15 minnesota l 88 - 99 (ot) austin daye (18) austin daye (11) will bynum (5) carrier dome 11747 2 - 3
6 9999-10-16 charlotte l 94 - 97 (ot) rodney stuckey (25) greg monroe (8) rodney stuckey , will bynum (5) colonial life arena 6847 2 - 4
7 9999-10-19 washington w 98 - 92 (ot) rodney stuckey (34) ben wallace (11) rodney stuckey (7) huntington center 6424 3 - 4

Step 2: Select rows where the 'location_attendance' is 'carrier dome 11747'.

SQL command for the step:

SELECT * FROM table_sql WHERE location_attendance = 'carrier dome 11747';
game date team score high_points high_rebounds high_assists location_attendance record
1 9999-10-05 miami l 89 - 105 (ot) ben gordon (17) ben gordon , charlie villanueva (5) rodney stuckey (5) american airlines arena 19600 0 - 1
2 9999-10-08 milwaukee w 115 - 110 (ot) austin daye (21) austin daye (7) will bynum (9) the palace of auburn hills 12821 1 - 1
3 9999-10-11 atlanta w 94 - 85 (ot) rodney stuckey (16) greg monroe (7) richard hamilton (7) the palace of auburn hills 10591 2 - 1
4 9999-10-13 dallas l 96 - 101 (ot) austin daye (16) ben wallace , jason maxiell (8) rodney stuckey (6) van andel arena 10207 2 - 2

Step 3: Select rows where the 'high_assists' is 'will bynum (5)'.

SQL command for the step:

SELECT * FROM table_sql WHERE high_assists = 'will bynum (5)';
game date team score high_points high_rebounds high_assists location_attendance record

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;
game date team score high_points high_rebounds high_assists location_attendance record

Verification:

The statement is FALSE