From the course: SQL Essential Training

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Filter and analyze using dates

Filter and analyze using dates - SQL Tutorial

From the course: SQL Essential Training

Filter and analyze using dates

- [Instructor] We have done some excellent work and performed quite a bit of analysis on numeric data. We've also performed analysis using text data, and in very much the same way, we can continue to perform analysis using a new data type, which is date data. Now, management at WSDA Music, they're interested in specific invoices in this part of their analysis. So they'd like to know how many invoices were billed on May 22, 2010. Before we start diving into the equivalent SQL to achieve such a request, we need to familiarize ourselves with how dates are stored in this particular database. So let's jump over to our Browse Data tab and take a look at any table that has the dates. We have our invoice table specified here. And if we take a look, dates are stored by year, followed by month, followed by day. It's very important to take a look as our first step as to how the current database you're working in is storing dates.…

Contents