Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql group by year

SELECT value1, extract(YEAR FROM my_date)
FROM my_table
GROUP BY value1, extract(YEAR FROM my_date);
 
PREVIOUS NEXT
Tagged: #sql #group #year
ADD COMMENT
Topic
Name
1+2 =