Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: verizon center 20173 for the location and attendance when the record is 49 - 36%

Table: 2008 - 09 miami heat season

game date team score high_points high_rebounds high_assists location_attendance record
75 9999-04-01 dallas l 96 - 98 (ot) dwyane wade (23) jermaine o'neal , udonis haslem (7) dwyane wade (6) american airlines center 20021 39 - 36
76 9999-04-03 charlotte w 97 - 92 (ot) dwyane wade (27) daequan cook (7) dwyane wade (10) time warner cable arena 19568 40 - 36
77 9999-04-04 washington w 118 - 104 (ot) dwyane wade (33) jermaine o'neal , jamaal magloire (6) dwyane wade (8) verizon center 20173 41 - 36
78 '9999-04-07' new orleans l 87 - 93 (ot) dwyane wade (32) jamaal magloire (10) dwyane wade (6) american airlines arena 19600 41 - 37
79 '9999-04-10' boston l 98 - 105 (ot) dwyane wade (31) michael beasley (13) dwyane wade (9) td banknorth garden 18624 41 - 38
80 '9999-04-12' new york w 122 - 105 (ot) dwyane wade (55) michael beasley (16) mario chalmers (9) american airlines arena 19600 42 - 38
81 9999-04-14 atlanta l 79 - 81 (ot) michael beasley (23) michael beasley (13) chris quinn (7) philips arena 42 - 39
82 '9999-04-15' detroit w 102 - 96 (ot) chris quinn (26) dorell wright (10) mario chalmers (10) american airlines arena 43 - 39
Generating plan to answer the query...

Generated steps

Step 1: Order the table by 'record' in descending order.

Step 2: Select rows where 'record' is '49 - 36'.

Step 3: Select rows where 'location_attendance' is 'verizon center 20173'.

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

Step 1: Order the table by 'record' in descending order.

SQL command for the step:

SELECT * FROM table_sql ORDER BY record DESC;
game date team score high_points high_rebounds high_assists location_attendance record
75 9999-04-01 dallas l 96 - 98 (ot) dwyane wade (23) jermaine o'neal , udonis haslem (7) dwyane wade (6) american airlines center 20021 39 - 36
76 9999-04-03 charlotte w 97 - 92 (ot) dwyane wade (27) daequan cook (7) dwyane wade (10) time warner cable arena 19568 40 - 36
77 9999-04-04 washington w 118 - 104 (ot) dwyane wade (33) jermaine o'neal , jamaal magloire (6) dwyane wade (8) verizon center 20173 41 - 36
78 '9999-04-07' new orleans l 87 - 93 (ot) dwyane wade (32) jamaal magloire (10) dwyane wade (6) american airlines arena 19600 41 - 37
79 '9999-04-10' boston l 98 - 105 (ot) dwyane wade (31) michael beasley (13) dwyane wade (9) td banknorth garden 18624 41 - 38
80 '9999-04-12' new york w 122 - 105 (ot) dwyane wade (55) michael beasley (16) mario chalmers (9) american airlines arena 19600 42 - 38
81 9999-04-14 atlanta l 79 - 81 (ot) michael beasley (23) michael beasley (13) chris quinn (7) philips arena 42 - 39
82 '9999-04-15' detroit w 102 - 96 (ot) chris quinn (26) dorell wright (10) mario chalmers (10) american airlines arena 43 - 39

Step 2: Select rows where 'record' is '49 - 36'.

SQL command for the step:

SELECT * FROM table_sql WHERE record = '49 - 36';
game date team score high_points high_rebounds high_assists location_attendance record
82 '9999-04-15' detroit w 102 - 96 (ot) chris quinn (26) dorell wright (10) mario chalmers (10) american airlines arena 43 - 39
81 9999-04-14 atlanta l 79 - 81 (ot) michael beasley (23) michael beasley (13) chris quinn (7) philips arena 42 - 39
80 '9999-04-12' new york w 122 - 105 (ot) dwyane wade (55) michael beasley (16) mario chalmers (9) american airlines arena 19600 42 - 38
79 '9999-04-10' boston l 98 - 105 (ot) dwyane wade (31) michael beasley (13) dwyane wade (9) td banknorth garden 18624 41 - 38
78 '9999-04-07' new orleans l 87 - 93 (ot) dwyane wade (32) jamaal magloire (10) dwyane wade (6) american airlines arena 19600 41 - 37
77 9999-04-04 washington w 118 - 104 (ot) dwyane wade (33) jermaine o'neal , jamaal magloire (6) dwyane wade (8) verizon center 20173 41 - 36
76 9999-04-03 charlotte w 97 - 92 (ot) dwyane wade (27) daequan cook (7) dwyane wade (10) time warner cable arena 19568 40 - 36
75 9999-04-01 dallas l 96 - 98 (ot) dwyane wade (23) jermaine o'neal , udonis haslem (7) dwyane wade (6) american airlines center 20021 39 - 36

Step 3: Select rows where 'location_attendance' is 'verizon center 20173'.

SQL command for the step:

SELECT * FROM table_sql WHERE location_attendance = 'verizon center 20173';
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