Searching for YEAR from list

[expired user #12018]'s profile image [expired user #12018] posted 5 years ago in General Permalink

I am trying to answer a question as to how many trips were made in a given year, the column start_date is formatted yyyy-mm-dd 00:00:00, I am looking for how many trips were made in the year 2016. I tried using

SELECT COUNT(*) FROM trips WHERE start_date LIKE '2016%';

I am getting an answer but I am not sure this is the way to go about it, how and where would I use the YEAR() function?

Please login to leave a reply, or register at first.