Skip to main contentSkip to solution

What is output of the following SQL statement?

SELECT DAY("2024-12-10");

Solution

✅ Correct Option: 2

DAY() returns the day of the month (1 to 31) from a date. In "2024-12-10" (format YYYY-MM-DD), the day part is 10.


Option 1: 2024 is the year, returned by YEAR().

Option 3: 12 is the month, returned by MONTH().

Option 4: Tuesday is the weekday name, returned by DAYNAME(), not DAY().

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question