Extract year from a date
SQL
Easy
3 views
Problem Description
From Orders, return order_id and order_year.
Sample Test Case
Input:
Orders(order_id, order_date)
Official Solution
SELECT order_id, EXTRACT(YEAR FROM order_date) AS order_year FROM Orders;
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!