Big SQL Energy Beginner Course: Lesson 18 Basic Date Functions
Getting out feet with date functions to prep for the upcoming date lessons!
Got BDE?⚡️
Hi BDEs! Welcome to Lesson 18 of the free Big SQL Energy Beginner Course⚡️ Today we’re learning about basic date functions in SQL!
Return to Big SQL Energy Beginner homepage here to access the other lessons:
If you’re new here:
💁🏽♀️ Who Am I?
I’m Jess Ramos, the founder of Big Data Energy and the creator of the BEST SQL course and community: Big SQL Energy⚡️. Check me out on socials: 🔗LinkedIn, 🔗Instagram, 🔗YouTube, and 🔗TikTok. And of course subscribe to my 🔗newsletter here for all my upcoming lessons and updates— all for free!
⚡️ What is Big SQL Energy?
🔗Big SQL Energy Intermediate is an intermediate SQL course designed to solve real-world business problems hands-on using realistic data and a modern tech stack. You’ll walk away with 2 SQL portfolio projects, portfolio building guidance, access to the Big Data Energy Discord community, and lots of confidence for you upcoming coding interviews! You also get access to all monthly events including masterclasses, office hours, and guest speakers. This course is all of the most important things I’ve learned on the job as a Senior Data Analyst in tech who grew from a $72K salary to over a $150K salary. And now I’m sharing it with YOU! It’s more than just another course— it’s a challenging program designed to upskill your SQL to the intermediate level, get ready to ace your live coding interviews, and build connections in the data community through the Discord and events.
Lesson 18: Basic Date Functions
Dates can be one of the most annoying things to work with in data, but using basic date functions can help us extract and isolate different parts of the date to be used in filtering, creating new columns, and transforming our data. Here are the main date functions we can use to extract different parts of the date:
month(): Extracts the month from a date.
day(): Extracts the day from a date.
year(): Extracts the year from a date.
We can also extract time parts from timestamps when applicable as well:
hour(): Extracts the hour from a datetime or timestamp.
minute(): Extracts the minute from a datetime or timestamp.
second(): Extracts the second from a datetime or timestamp.
If there is no timestamp, and you input a regular date into a time function like these above, the result will be 0 since the default timestamp on a regular date data type is 00:00:00.
This was an incredibly short lesson, but we have to start with the date basics, so we can get to the juicier stuff later on! 🔥
If you’ve enjoyed the free BEGINNER Big SQL Energy course, grab my intermediate course. There are no deadlines or timelines for this course— you start and take as long as you want. It will take your beginner skills to the next level and get you ready to ace your interviews. DM me or email me at courses@bdeanalytics.com if you have questions on the intermediate course!
Return to Big SQL Energy Beginner homepage here to access the other lessons: