Topfolio
Career TracksMicro Free CoursesTask CoursesPracticeInterview PracticeWork ExperienceProjects
Career TrackBlog
Support
Dashboard
Career TracksMicro Free CoursesTask Courses
SQL & Python
Interview Prep
Work ExperienceProjectsResume Feedback
CertificatesMy OrdersRefer & Earn
Join Community

Navigation

Dashboard
Learn
Career TracksMicro Free CoursesTask Courses
Practice
SQL & PythonInterview Prep
Career
Work ExperienceProjectsResume Feedback
My Stuff
CertificatesMy OrdersRefer & Earn
Join Community
Topfolio

Learn data analytics online. Real skills, real projects, real community.

courses

  • Career Tracks
  • Work Experience
  • Best Data Analyst Course in India
  • SQL Fundamentals
  • SQL Advanced
  • Python for Data
  • Micro Free Courses

practice

  • SQL Fundamentals Interview Test
  • SQL Advanced Coding Test
  • All Practice Tests

resources

  • How to Become a Data Analyst
  • SQL Interview Questions
  • Data Analyst Salary Guide
  • Free Datasets for Practice
  • SQL vs NoSQL Guide
  • Data Analyst vs Data Engineer vs Data Scientist

employers

  • Enterprise Screening
  • AI Proctoring Demo
  • Volume Pricing
  • Employer Portal

company

  • About
  • Terms
© 2026 Topfolio. All rights reserved.Made with ❤️ for aspiring analysts
  1. Home
  2. /
  3. Practice
  4. /
  5. SQL Date and Time Functions

SQL Date and Time Functions Practice Questions

Almost every reporting question is a date question: revenue by month, signups in the last 30 days, days between an order and its delivery. Getting it right means truncating timestamps to the right grain, extracting parts with EXTRACT, formatting with TO_CHAR, and doing arithmetic with intervals rather than subtracting raw strings. These questions work with real timestamp columns so the edge cases, month boundaries and time zones behave the way they do in production.

What you will practice

  • •Group by month or week by truncating the timestamp instead of formatting it as text
  • •Pull out a year, month, quarter or weekday with EXTRACT for cohort and seasonality analysis
  • •Add and subtract intervals to build rolling windows such as the last 7 or 30 days
  • •Measure the gap between two timestamps in days, hours or months
  • •Format dates for output with TO_CHAR while keeping the underlying column sortable

15 of 17 questions in this topic

  • GROUP BY Multiple Columnsbeginner
  • Parse Date Stringsintermediate
  • Monthly Sales Summaryintermediate
  • Month-over-Month Revenue Growth Rateadvanced
  • Cumulative Revenue by Country Over Timeadvanced
  • Customer Purchase Gap Analysisadvanced
  • Year-over-Year Genre Revenue Changeadvanced
  • Monthly Invoice Trend (2012)intermediate
  • Customers Active in Multiple Yearsintermediate
  • Employee Tenure Bracketintermediate
  • Quarterly Genre Sales (2012-2013)intermediate
  • First-Purchase Cohort Count by Monthintermediate
  • Monthly Cohort Retentionadvanced
  • Month-over-Month Revenue & Top Customeradvanced
  • LTV Quartile & Recency Analysisadvanced