Plan-of-SQLs Interface FP

Task: Verify the Statement against the Table

Statement: the chicago bulls were the only teamn to play the boston celtics in boston garden and win

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: Select rows where 'opponent' is 'chicago bulls'.

Step 2: Select rows where 'location' is 'boston garden'.

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

Step 1: Select rows where 'opponent' is 'chicago bulls'.

SQL command for the step:

SELECT * FROM table_sql WHERE opponent = 'chicago bulls';
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 rows where 'location' is 'boston garden'.

SQL command for the step:

SELECT * FROM table_sql WHERE location = 'boston garden';
game date opponent score location record
36 9999-01-09 chicago bulls 111 - 108 boston garden 30 - 6

Step 3: 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
36 9999-01-09 chicago bulls 111 - 108 boston garden 30 - 6

Verification:

The statement is TRUE