Plan-of-SQLs Interface TP

Task: Verify the Statement against the Table

Statement: the vctp 20 mm (79in) rh - 202 autocannon does not have 75 km / h (47 mph) as the vcrt

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 the 'vctp' column is '20 mm (79in) rh - 202 autocannon'.

Step 2: Select rows where the 'vcrt' column is not '75 km / h (47 mph)'.

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

Step 1: Select rows where the 'vctp' column 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 the 'vcrt' column is not '75 km / h (47 mph)'.

SQL command for the step:

SELECT * FROM table_sql WHERE vcrt <> '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 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;
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

Verification:

The statement is TRUE