Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: t7 is the place of player peter oosterhuis , who has 10875

Table: 1975 u.s. open (golf)

place player country score to_par money
t1 lou graham united states 74 + 72 + 68 + 73 = 287 + 3 playoff
t1 john mahaffey united states 73 + 71 + 72 + 71 = 287 + 3 playoff
t3 frank beard united states 74 + 69 + 67 + 78 = 288 + 4 10875
t3 ben crenshaw united states 70 + 68 + 76 + 74 = 288 + 4 10875
t3 hale irwin united states 74 + 71 + 73 + 70 = 288 + 4 10875
t3 bob murphy united states 74 + 73 + 72 + 69 = 288 + 4 10875
t7 jack nicklaus united states 72 + 70 + 75 + 72 = 289 + 5 7500
t7 peter oosterhuis england 69 + 73 + 72 + 75 = 289 + 5 7500
t9 pat fitzsimons united states 67 + 73 + 73 + 77 = 290 + 6 5000
t9 arnold palmer united states 69 + 75 + 73 + 73 = 290 + 6 5000
t9 tom watson united states 67 + 68 + 78 + 77 = 290 + 6 5000
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'place' is 't7'.

Step 2: Select rows where 'player' is 'peter oosterhuis'.

Step 3: Select rows where 'money' is 10875.

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 'place' is 't7'.

SQL command for the step:

SELECT * FROM table_sql WHERE place = 't7';
place player country score to_par money
t1 lou graham united states 74 + 72 + 68 + 73 = 287 + 3 playoff
t1 john mahaffey united states 73 + 71 + 72 + 71 = 287 + 3 playoff
t3 frank beard united states 74 + 69 + 67 + 78 = 288 + 4 10875
t3 ben crenshaw united states 70 + 68 + 76 + 74 = 288 + 4 10875
t3 hale irwin united states 74 + 71 + 73 + 70 = 288 + 4 10875
t3 bob murphy united states 74 + 73 + 72 + 69 = 288 + 4 10875
t7 jack nicklaus united states 72 + 70 + 75 + 72 = 289 + 5 7500
t7 peter oosterhuis england 69 + 73 + 72 + 75 = 289 + 5 7500
t9 pat fitzsimons united states 67 + 73 + 73 + 77 = 290 + 6 5000
t9 arnold palmer united states 69 + 75 + 73 + 73 = 290 + 6 5000
t9 tom watson united states 67 + 68 + 78 + 77 = 290 + 6 5000

Step 2: Select rows where 'player' is 'peter oosterhuis'.

SQL command for the step:

SELECT * FROM table_sql WHERE player = 'peter oosterhuis';
place player country score to_par money
t7 jack nicklaus united states 72 + 70 + 75 + 72 = 289 + 5 7500
t7 peter oosterhuis england 69 + 73 + 72 + 75 = 289 + 5 7500

Step 3: Select rows where 'money' is 10875.

SQL command for the step:

SELECT * FROM table_sql WHERE money = 10875;
place player country score to_par money
t7 peter oosterhuis england 69 + 73 + 72 + 75 = 289 + 5 7500

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;
place player country score to_par money

Verification:

The statement is FALSE