Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: the jazz had a houston graduate from turkey play for them from 2005 - 06

Table: utah jazz all - time roster

player nationality position years_for_jazz school___club_team
mehmet okur turkey forward - center 2004 - 11 efes pilsen ( turkey )
josã ortiz puerto rico center 1988 - 90 oregon state
greg ostertag united states center 1995 - 2004 , 2005 - 06 kansas
dan o 'sullivan united states center 1990 - 91 fordham
andre owens united states guard 2005 - 06 houston
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'school___club_team' contains 'houston'.

Step 2: Select rows where 'nationality' is 'turkey'.

Step 3: Select rows where 'years_for_jazz' is '2005-06'.

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 'school___club_team' contains 'houston'.

SQL command for the step:

SELECT * FROM table_sql WHERE school___club_team LIKE '%houston%';
player nationality position years_for_jazz school___club_team
mehmet okur turkey forward - center 2004 - 11 efes pilsen ( turkey )
josã ortiz puerto rico center 1988 - 90 oregon state
greg ostertag united states center 1995 - 2004 , 2005 - 06 kansas
dan o 'sullivan united states center 1990 - 91 fordham
andre owens united states guard 2005 - 06 houston

Step 2: Select rows where 'nationality' is 'turkey'.

SQL command for the step:

SELECT * FROM table_sql WHERE nationality = 'turkey';
player nationality position years_for_jazz school___club_team
andre owens united states guard 2005 - 06 houston

Step 3: Select rows where 'years_for_jazz' is '2005-06'.

SQL command for the step:

SELECT * FROM table_sql WHERE years_for_jazz = '2005-06';
player nationality position years_for_jazz school___club_team

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;
player nationality position years_for_jazz school___club_team

Verification:

The statement is FALSE