BETWEEN
The BETWEEN keyword works as a series of AND if we are looking for values between two values:
SELECT * FROM z
WHERE x BETWEEN a AND b
SELECT * FROM z
WHERE x >= a AND x <= BThe two queries above should have the same result.
Note that we can also use NOT BETWEEN, resulting in the use of an OR condition:
SELECT * FROM z
WHERE x NOT BETWEEN a AND b
SELECT * FROM z
WHERE x < a OR x > BIN
The IN keyword works as an OR operator applied to a list. It checks whether a value is part of an array:
SELECT x from y
WHERE x IN (a, b, c)