Plan-of-SQLs Interface FP

Task: Verify the Statement against the Table

Statement: brazil has transport / utility and attack type aircrafts

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 'origin' is 'brazil'.

Step 2: Select rows where 'type' is 'transport / utility' or 'attack'.

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

Step 1: Select rows where 'origin' is 'brazil'.

SQL command for the step:

SELECT * FROM table_sql WHERE origin = 'brazil';
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 'type' is 'transport / utility' or 'attack'.

SQL command for the step:

SELECT * FROM table_sql WHERE type IN ('transport / utility', 'attack');
aircraft origin type versions in_service
embraer emb 110 bandeirante brazil transport / utility c - 95 3
embraer emb 120 brasilia brazil transport emb 120 1

Step 3: Use a `CASE` statement to return TRUE if the number of rows is greater than or 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;
aircraft origin type versions in_service
embraer emb 110 bandeirante brazil transport / utility c - 95 3

Verification:

The statement is TRUE