Interview quiz track

First 2 free Intermediate SQL

SQL – Date and Time Functions

Practice SQL date and time function interview questions. Cover filtering by date, extracting parts, date differences, and time-based aggregations. Write queries and receive feedback on correctness and approach. Ideal for data analyst and SQL interview prep. First 2 questions are free with full feedback.

  • Level Intermediate
  • Questions 12
  • SQL
  • dates
  • time
  • intermediate
  • interview practice

Try any track free — first 2 questions include full AI feedback. Subscribe to finish the track and unlock everything. Type or speak your answer — the first 2 questions include scoring and detailed AI feedback.

Try first 2 questions free All tracks

Sample sql – date and time functions interview questions

Preview 6 questions from this track in quiz order. In the full quiz you answer one at a time — type or speak — then get a score and feedback.

  1. How do you filter rows from the last 7 days?

    What a strong answer includes

    Uses CURRENT_DATE or NOW() with an interval.

  2. Write a query to extract the year and month from a timestamp.

    What a strong answer includes

    Uses EXTRACT or DATE_TRUNC.

  3. How do you calculate the number of days between two dates?

    What a strong answer includes

    Subtracts dates or uses a date difference function.

  4. Write a query to group revenue by month.

    What a strong answer includes

    Truncates or extracts month and sums.

  5. How do you find records from the current month?

    What a strong answer includes

    Compares year and month or uses date truncation.

  6. Explain the difference between a date and a timestamp.

    What a strong answer includes

    Timestamp includes time; date is day only.