3

I found a similar question, but the answer solve the problem indirectly. So, here I reshape the question.

Say, in the following situation, how am I going to use "ELSE IF" statement?

CASE
  WHEN  "land use" != 'residential' THEN 'other land uses'
  ELSEIF  "area" < 1000 THEN 'small lot'
  ELSE 'large lot'
END
Taras
  • 32,823
  • 4
  • 66
  • 137
David H. J.
  • 570
  • 2
  • 9

1 Answers1

6

For your issue I can suggest trying this query

CASE
  WHEN  "land use" != 'residential' THEN 'other land uses'
  WHEN  "area" < 1000 THEN 'small lot'
  ELSE 'large lot'
END

Moreover, I recommend reading this article W3Schools | SQL CASE Statement and paying attention to CASE Syntax.

To comprehend the difference between quotation marks in QGIS please read this thread Difference between quotation marks ('single' vs “double”) in QGIS.

Taras
  • 32,823
  • 4
  • 66
  • 137