From the course: Complete Guide to Analytics Engineering
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
SQL date functions
From the course: Complete Guide to Analytics Engineering
SQL date functions
- [Instructor] The majority of data sets we work with as an analytics engineer have a date field of some type in the table. That's how we often collect data. We measure events over time. As such, getting familiar with the functions that allow you to alter or compare date and time fields is very important. There will be times your date fields come through as the wrong data type and you'll need to transform them. Other times, you'll need to remove a time from a date time field, or you'll need to adjust the time zone on a date field or find the numerical difference between two dates. In this video, we'll cover the most common date functions and why we use them. First, let's start by doing a similar function we did in Python, but with SQL instead. You'll remember that our sales table that hadn't been cleaned yet had a field that was not a date field, but a text field. Let's confirm with a quick query that the columns of our table are the correct data types. In SQLite, you can run PRAGMA…
Contents
-
-
-
-
-
-
-
-
(Locked)
Introduction to SQL for analytics engineering1m 17s
-
(Locked)
The SELECT statement4m 31s
-
(Locked)
Filtering data results with the WHERE clause9m 49s
-
Aggregate functions in SQL6m 51s
-
(Locked)
SQL date functions6m 28s
-
(Locked)
Inner joining multiple tables7m 26s
-
(Locked)
Left joining multiple tables8m 45s
-
(Locked)
Other types of SQL joins5m 18s
-
(Locked)
Common table expressions9m 30s
-
(Locked)
CoderPad solution: Modeling data with SQL37s
-
(Locked)
-
-
-
-