Plan-of-SQLs Interface TN

Task: Verify the Statement against the Table

Statement: bell uh - 1 iroquois is the version of b - 58 aircraft model originated in the united states which has 2 in service

Table: uruguayan air force

aircraft origin type versions in_service
cessna a - 37 dragonfly united states attack / fighter a - 37b 12 (16 delivered)
fma ia 58 pucarã¡ argentina attack a - 58 5 (6 delivered)
lockheed c - 130 hercules united states transport / utility c - 130b 2
embraer emb 110 bandeirante brazil transport / utility c - 95 3
beechcraft twin bonanza united states transport / utility d50 1
casa c - 212 aviocar spain transport c - 212 - 200 2
embraer emb 120 brasilia brazil transport emb 120 1
cessna 206 stationair united states utility / liaison u206h 10
beechcraft b58 baron united states trainer / liaison b - 58 2
british aerospace 125 united kingdom vip transport 700a 600a 2
aermacchi sf260 italy trainer t - 260 eu 12
pilatus pc - 7 turbo trainer switzerland trainer - 92 5 (6 delivered)
cessna t - 41 mescalero united states trainer t - 41d 7
aerospatiale as 365 dauphin france liaison / transport as 365 1
bell 212 twin huey united states transport / utility bell 212 4
bell uh - 1 iroquois united states transport / utility uh - 1h 13
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'aircraft' is 'b - 58'.

Step 2: Select rows where 'origin' is 'united states'.

Step 3: Select rows where 'versions' is 'uh - 1h'.

Step 4: Use a `CASE` statement to return TRUE if the number of rows is equal to 1 and 'in_service' is 2, otherwise return FALSE.

Step 1: Select rows where 'aircraft' is 'b - 58'.

SQL command for the step:

SELECT * FROM table_sql WHERE aircraft = 'b - 58';
aircraft origin type versions in_service
cessna a - 37 dragonfly united states attack / fighter a - 37b 12 (16 delivered)
fma ia 58 pucarã¡ argentina attack a - 58 5 (6 delivered)
lockheed c - 130 hercules united states transport / utility c - 130b 2
embraer emb 110 bandeirante brazil transport / utility c - 95 3
beechcraft twin bonanza united states transport / utility d50 1
casa c - 212 aviocar spain transport c - 212 - 200 2
embraer emb 120 brasilia brazil transport emb 120 1
cessna 206 stationair united states utility / liaison u206h 10
beechcraft b58 baron united states trainer / liaison b - 58 2
british aerospace 125 united kingdom vip transport 700a 600a 2
aermacchi sf260 italy trainer t - 260 eu 12
pilatus pc - 7 turbo trainer switzerland trainer - 92 5 (6 delivered)
cessna t - 41 mescalero united states trainer t - 41d 7
aerospatiale as 365 dauphin france liaison / transport as 365 1
bell 212 twin huey united states transport / utility bell 212 4
bell uh - 1 iroquois united states transport / utility uh - 1h 13

Step 2: Select rows where 'origin' is 'united states'.

SQL command for the step:

SELECT * FROM table_sql WHERE origin = 'united states';
aircraft origin type versions in_service

Step 3: Select rows where 'versions' is 'uh - 1h'.

SQL command for the step:

SELECT * FROM table_sql WHERE versions = 'uh - 1h';
aircraft origin type versions in_service

Step 4: Use a `CASE` statement to return TRUE if the number of rows is equal to 1 and 'in_service' is 2, otherwise return FALSE.

SQL command for the step:

SELECT CASE WHEN COUNT(*) = 1 AND MAX(in_service) = 2 THEN TRUE ELSE FALSE END AS verification FROM table_sql;
aircraft origin type versions in_service

Verification:

The statement is FALSE