# Between Function
This is an example of the BETWEEN function in BigQuery:
SELECT *
FROM `mydataset.mytable`
WHERE date BETWEEN '2021-01-01' AND '2021-12-31'
The BETWEEN function in BigQuery allows you to select only rows within a specified range. In the above example, the query returns all rows where the date column is between January 1st, 2021 and December 31st, 2021. The BETWEEN function is inclusive, meaning that the range includes both the start and end values.
The BETWEEN function can be used with any data type that can be ordered, such as dates, numbers, or strings. By using the BETWEEN function, you can filter your data to only include the rows that you are interested in, which can simplify your analysis and save you time and resources.