Match a range of dates

From SQLZOO
Jump to navigation Jump to search

Match a range of dates

schema:gisq

The BETWEEN clause may be used with dates, numbers and strings.

SELECT * FROM totp
 WHERE wk BETWEEN DATE '1980-05-20'
              AND DATE '1980-05-26'
SELECT * FROM totp
 WHERE wk BETWEEN '1980-05-20'
              AND '1980-05-26'
SELECT * FROM totp
 WHERE wk BETWEEN #20 May 1980#
              AND #26 May 1980#
DataWars, Data Science Practice Projects - LogoDataWars: Practice Data Science/Analysis with +100 Real Life Projects