Plan-of-SQLs Interface FN

Task: Verify the Statement against the Table

Statement: the vcpc and vcrt of 7.62 mm (0.3in) fn mag 60 - 20 machine gun are the same for vctp 20 mm (79in) rh - 202 autocannon , and so is the vcpc and vcrt of 75 km / h (47 mph) for vctp 75 km / h (47 mph)

Table: tam (tank)

vctp vca_155 vctm vcpc vclc vcrt
28.2 t (31.1 tons ) 40t (44.1tons) 26t (28.7tons) 25t (27.6tons) 32t (35.3tons) 32t (35.3tons)
20 mm (79in) rh - 202 autocannon 155 mm (6.1in) l / 41 howitzer 120 mm (4.72in) mortar 7.62 mm (0.3in) fn mag 60 - 20 machine gun 160 mm (6.3in) or 350 mm (13.8in) rockets 7.62 mm (0.3in) fn mag 60 - 20 machine gun
km (mi) - km (mi) - km (mi) km (mi)
24hp / t (23hp / ton) 18hp / t ( 16.5hp / ton) 28.8hp / t (25.1hp / ton) 28.8hp / t (25.1hp / ton) 22.5hp / t (20.4hp / ton) 22.5hp / t (20.4hp / ton)
75 km / h (47 mph) 55 km / h (34 mph) 75 km / h (47 mph) 75 km / h (47 mph) 75 km / h (47 mph) 75 km / h (47 mph)
Generating plan to answer the query...

Generated steps

Step 1: Select rows where 'vctp' is '20 mm (79in) rh - 202 autocannon'.

Step 2: Select rows where 'vctp' is '75 km / h (47 mph)'.

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

Step 1: Select rows where 'vctp' is '20 mm (79in) rh - 202 autocannon'.

SQL command for the step:

SELECT * FROM table_sql WHERE vctp = '20 mm (79in) rh - 202 autocannon';
vctp vca_155 vctm vcpc vclc vcrt
28.2 t (31.1 tons ) 40t (44.1tons) 26t (28.7tons) 25t (27.6tons) 32t (35.3tons) 32t (35.3tons)
20 mm (79in) rh - 202 autocannon 155 mm (6.1in) l / 41 howitzer 120 mm (4.72in) mortar 7.62 mm (0.3in) fn mag 60 - 20 machine gun 160 mm (6.3in) or 350 mm (13.8in) rockets 7.62 mm (0.3in) fn mag 60 - 20 machine gun
km (mi) - km (mi) - km (mi) km (mi)
24hp / t (23hp / ton) 18hp / t ( 16.5hp / ton) 28.8hp / t (25.1hp / ton) 28.8hp / t (25.1hp / ton) 22.5hp / t (20.4hp / ton) 22.5hp / t (20.4hp / ton)
75 km / h (47 mph) 55 km / h (34 mph) 75 km / h (47 mph) 75 km / h (47 mph) 75 km / h (47 mph) 75 km / h (47 mph)

Step 2: Select rows where 'vctp' is '75 km / h (47 mph)'.

SQL command for the step:

SELECT * FROM table_sql WHERE vctp = '75 km / h (47 mph)';
vctp vca_155 vctm vcpc vclc vcrt
20 mm (79in) rh - 202 autocannon 155 mm (6.1in) l / 41 howitzer 120 mm (4.72in) mortar 7.62 mm (0.3in) fn mag 60 - 20 machine gun 160 mm (6.3in) or 350 mm (13.8in) rockets 7.62 mm (0.3in) fn mag 60 - 20 machine gun

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

SQL command for the step:

SELECT CASE WHEN (SELECT COUNT(*) FROM table_sql WHERE <condition_for_step_1>) = (SELECT COUNT(*) FROM table_sql WHERE <condition_for_step_2>) THEN TRUE ELSE FALSE END AS verification;
vctp vca_155 vctm vcpc vclc vcrt

Verification:

The statement is FALSE