BETWEEN

The BETWEEN operator computes the metric by using attribute values, metrics or macros, from a specified range (including/excluding endpoints). As a filtering operator, it includes only those attribute values that fall within some specified range. The range is specified by two inclusive attribute value endpoints.

Syntax

SELECT … WHERE … BETWEEN … AND …
SELECT metric WHERE attribute BETWEEN attribute_value1 AND attribute_value2

Examples

SELECT Profit WHERE Year BETWEEN 2005 AND 2008
SELECT Sales WHERE (Quarter BETWEEN THIS - 5 AND THIS)
Powered by Atlassian Confluence and Scroll Viewport.