year | regional_gva | agriculture | industry | services |
1995 | 4753 | 11 | 1110 | 3632 |
2000 | 6584 | 10 | 1302 | 5277 |
2003 | 8201 | 11 | 1374 | 6816 |
2005 | 8978 | 11 | 1465 | 7502 |
2007 | 9432 | 11 | 1565 | 7856 |
year | regional_gva | agriculture | industry | services |
1995 | 4753 | 11 | 1110 | 3632 |
2000 | 6584 | 10 | 1302 | 5277 |
2003 | 8201 | 11 | 1374 | 6816 |
2005 | 8978 | 11 | 1465 | 7502 |
2007 | 9432 | 11 | 1565 | 7856 |
Step 1: Select rows where 'regional_gva' is equal to 6584.
Step 2: Select rows where 'services' is less than 7502.
Step 3: Select rows where 'industry' is less than 1565.
Step 4: Select rows where 'agriculture' is equal to 54.
Step 5: Use a `CASE` statement to return TRUE if the number of rows is greater than or equal to 1, otherwise return FALSE.
SELECT * FROM table_sql WHERE regional_gva = 6584;
year | regional_gva | agriculture | industry | services |
1995 | 4753 | 11 | 1110 | 3632 |
2000 | 6584 | 10 | 1302 | 5277 |
2003 | 8201 | 11 | 1374 | 6816 |
2005 | 8978 | 11 | 1465 | 7502 |
2007 | 9432 | 11 | 1565 | 7856 |
SELECT * FROM table_sql WHERE services < 7502;
year | regional_gva | agriculture | industry | services |
2000 | 6584 | 10 | 1302 | 5277 |
SELECT * FROM table_sql WHERE industry < 1565;
year | regional_gva | agriculture | industry | services |
2000 | 6584 | 10 | 1302 | 5277 |
SELECT * FROM table_sql WHERE agriculture = 54;
year | regional_gva | agriculture | industry | services |
2000 | 6584 | 10 | 1302 | 5277 |
SELECT CASE WHEN COUNT(*) >= 1 THEN TRUE ELSE FALSE END AS verification FROM table_sql;
year | regional_gva | agriculture | industry | services |