Plan-of-SQLs Interface FN

Task: Verify the Statement against the Table

Statement: patty sheehan , judy rankin , and kathy whitworth were all captains that won the cup two times

Table: solheim cup

year venue winning_team score usa_captain europe_captain
2013-01-01 colorado golf club , colorado , usa europe 18 - 10 meg mallon liselotte neumann
2011-01-01 killeen castle golf resort , ireland europe 15 - 13 rosie jones alison nicholas
2009-01-01 rich harvest farms , illinois , usa united states 16 - 12 beth daniel alison nicholas
2007-01-01 halmstad gk , sweden united states 16 - 12 betsy king helen alfredsson
2005-01-01 crooked stick golf club , indiana , usa united states 15½ - 12½ nancy lopez catrin nilsmark
2003-01-01 barsebäck golf & country club , sweden europe 17½ - 10½ patty sheehan catrin nilsmark
2002-01-01 interlachen country club , minnesota , usa united states 15½ - 12½ patty sheehan dale reid
2000-01-01 loch lomond golf club , scotland europe 14½ - 11½ pat bradley dale reid
1998-01-01 muirfield village , ohio , usa united states 16 - 12 judy rankin pia nilsson
1996-01-01 st pierre golf & country club , wales united states 17 - 11 judy rankin mickey walker
1994-01-01 the greenbrier , west virginia , usa united states 13 - 7 joanne carner mickey walker
1992-01-01 dalmahoy country club , scotland europe 11½ - 6½ kathy whitworth mickey walker
1990-01-01 lake nona golf & country club , florida , usa united states 11½ - 4½ kathy whitworth mickey walker
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'usa_captain' is 'patty sheehan', 'judy rankin', or 'kathy whitworth'.

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

Step 1: Select rows where 'usa_captain' is 'patty sheehan', 'judy rankin', or 'kathy whitworth'.

SQL command for the step:

SELECT * FROM table_sql WHERE usa_captain IN ('patty sheehan', 'judy rankin', 'kathy whitworth');
year venue winning_team score usa_captain europe_captain
2013-01-01 colorado golf club , colorado , usa europe 18 - 10 meg mallon liselotte neumann
2011-01-01 killeen castle golf resort , ireland europe 15 - 13 rosie jones alison nicholas
2009-01-01 rich harvest farms , illinois , usa united states 16 - 12 beth daniel alison nicholas
2007-01-01 halmstad gk , sweden united states 16 - 12 betsy king helen alfredsson
2005-01-01 crooked stick golf club , indiana , usa united states 15½ - 12½ nancy lopez catrin nilsmark
2003-01-01 barsebäck golf & country club , sweden europe 17½ - 10½ patty sheehan catrin nilsmark
2002-01-01 interlachen country club , minnesota , usa united states 15½ - 12½ patty sheehan dale reid
2000-01-01 loch lomond golf club , scotland europe 14½ - 11½ pat bradley dale reid
1998-01-01 muirfield village , ohio , usa united states 16 - 12 judy rankin pia nilsson
1996-01-01 st pierre golf & country club , wales united states 17 - 11 judy rankin mickey walker
1994-01-01 the greenbrier , west virginia , usa united states 13 - 7 joanne carner mickey walker
1992-01-01 dalmahoy country club , scotland europe 11½ - 6½ kathy whitworth mickey walker
1990-01-01 lake nona golf & country club , florida , usa united states 11½ - 4½ kathy whitworth mickey walker

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

SQL command for the step:

SELECT CASE WHEN COUNT(*) = 3 THEN TRUE ELSE FALSE END AS verification FROM table_sql;
year venue winning_team score usa_captain europe_captain
2003-01-01 barsebäck golf & country club , sweden europe 17½ - 10½ patty sheehan catrin nilsmark
2002-01-01 interlachen country club , minnesota , usa united states 15½ - 12½ patty sheehan dale reid
1998-01-01 muirfield village , ohio , usa united states 16 - 12 judy rankin pia nilsson
1996-01-01 st pierre golf & country club , wales united states 17 - 11 judy rankin mickey walker
1992-01-01 dalmahoy country club , scotland europe 11½ - 6½ kathy whitworth mickey walker
1990-01-01 lake nona golf & country club , florida , usa united states 11½ - 4½ kathy whitworth mickey walker

Verification:

The statement is FALSE