SQL DATE Data Type

A calendar date only — year, month, day. No time of day, no timezone.

What & Why

DATE stores a calendar date: year, month, day. Nothing about the time of day is stored at all — 2024-01-15 is a complete, valid DATE value on its own.

See How It Works

idnamechannelspendstart_dateend_datestatustarget_segment
1Spring Launchgoogle_ads55000.002024-01-152024-03-31activesmb
2Retention Webinaremail45000.002024-02-102024-04-15activeenterprise
3Finance Retargetinglinkedin50000.002024-03-122024-05-31activeenterprise
4Enterprise Searchgoogle_ads60000.002024-04-012024-06-30activeenterprise
EXAMPLE QUERY
SELECT name, start_date FROM marketing.campaigns
WHERE start_date > '2024-02-01';
RESULT — campaigns after February 1, 2024
namestart_date
Retention Webinar2024-02-10
Finance Retargeting2024-03-12
Enterprise Search2024-04-01

DATE values compare chronologically, so all three campaigns that start after 2024-02-01 are returned in date order.

Now You Try

Practice this concept

Marketing wants campaigns that started after February 1, 2024, ordered by their start date.

Available schema
marketing

Prefix tables with marketing.table_name.

namestart_date
marketing.campaigns
ColumnType
idinteger
nametext
channeltext
spendnumeric
start_datedate
end_datedate
statustext
target_segmenttext
legacy_idtext
query.sql
Beginner business practice

Sign up free to try it on a real business scenario