Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: the boston celtics acheived their lowest scoring game against the philadelphia 76s

Table: 1984 - 85 boston celtics season

game date opponent score location record
33 9999-01-02 new jersey nets 110 - 95 brendan byrne arena 27 - 6
34 9999-01-04 new york knicks 105 - 94 boston garden 28 - 6
35 9999-01-07 new york knicks 108 - 97 madison square garden 29 - 6
36 9999-01-09 chicago bulls 111 - 108 boston garden 30 - 6
37 9999-01-11 washington bullets 103 - 101 boston garden 31 - 6
38 9999-01-12 atlanta hawks 119 - 111 the omni 32 - 6
39 9999-01-16 los angeles lakers 104 - 102 boston garden 33 - 6
40 9999-01-18 indiana pacers 86 - 91 market square arena 33 - 7
41 9999-01-20 philadelphia 76ers 113 - 97 boston garden 34 - 7
42 9999-01-23 seattle supersonics 97 - 107 boston garden 34 - 8
43 9999-01-25 indiana pacers 125 - 94 boston garden 35 - 8
44 9999-01-27 portland trail blazers 128 - 127 boston garden 36 - 8
45 9999-01-29 detroit pistons 131 - 130 hartford civic center 37 - 8
46 9999-01-30 philadelphia 76ers 104 - 122 the spectrum 37 - 9
Generating plan to answer the query...

Generated steps

Step 1: Order the table by the 'score' column in ascending order.

Step 2: Select row number 1.

Step 3: Select rows where the 'opponent' is 'philadelphia 76ers'.

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 the 'score' column in ascending order.

SQL command for the step:

SELECT * FROM table_sql ORDER BY score ASC;
game date opponent score location record
33 9999-01-02 new jersey nets 110 - 95 brendan byrne arena 27 - 6
34 9999-01-04 new york knicks 105 - 94 boston garden 28 - 6
35 9999-01-07 new york knicks 108 - 97 madison square garden 29 - 6
36 9999-01-09 chicago bulls 111 - 108 boston garden 30 - 6
37 9999-01-11 washington bullets 103 - 101 boston garden 31 - 6
38 9999-01-12 atlanta hawks 119 - 111 the omni 32 - 6
39 9999-01-16 los angeles lakers 104 - 102 boston garden 33 - 6
40 9999-01-18 indiana pacers 86 - 91 market square arena 33 - 7
41 9999-01-20 philadelphia 76ers 113 - 97 boston garden 34 - 7
42 9999-01-23 seattle supersonics 97 - 107 boston garden 34 - 8
43 9999-01-25 indiana pacers 125 - 94 boston garden 35 - 8
44 9999-01-27 portland trail blazers 128 - 127 boston garden 36 - 8
45 9999-01-29 detroit pistons 131 - 130 hartford civic center 37 - 8
46 9999-01-30 philadelphia 76ers 104 - 122 the spectrum 37 - 9

Step 2: Select row number 1.

SQL command for the step:

SELECT * FROM table_sql LIMIT 1;
game date opponent score location record
40 9999-01-18 indiana pacers 86 - 91 market square arena 33 - 7
34 9999-01-04 new york knicks 105 - 94 boston garden 28 - 6
37 9999-01-11 washington bullets 103 - 101 boston garden 31 - 6
42 9999-01-23 seattle supersonics 97 - 107 boston garden 34 - 8
33 9999-01-02 new jersey nets 110 - 95 brendan byrne arena 27 - 6
35 9999-01-07 new york knicks 108 - 97 madison square garden 29 - 6
39 9999-01-16 los angeles lakers 104 - 102 boston garden 33 - 6
41 9999-01-20 philadelphia 76ers 113 - 97 boston garden 34 - 7
36 9999-01-09 chicago bulls 111 - 108 boston garden 30 - 6
43 9999-01-25 indiana pacers 125 - 94 boston garden 35 - 8
46 9999-01-30 philadelphia 76ers 104 - 122 the spectrum 37 - 9
38 9999-01-12 atlanta hawks 119 - 111 the omni 32 - 6
44 9999-01-27 portland trail blazers 128 - 127 boston garden 36 - 8
45 9999-01-29 detroit pistons 131 - 130 hartford civic center 37 - 8

Step 3: Select rows where the 'opponent' is 'philadelphia 76ers'.

SQL command for the step:

SELECT * FROM table_sql WHERE opponent = 'philadelphia 76ers';
game date opponent score location record
40 9999-01-18 indiana pacers 86 - 91 market square arena 33 - 7

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 opponent score location record

Verification:

The statement is FALSE