I'm having some trouble with filtering for a specific year with a timestamp.
This is the code I have to convert the timestamp into the yyyy-mm-dd format:
SELECT rating, timestamp, FROM_UNIXTIME(timestamp) as datetime, CAST(FROM_UNIXTIME(timestamp) as date) AS date_value FROM ratings;
Then I tried to extract the ratings for the year 2000 with
- WHERE year=2000
- WHERE date_value >= 2000-01-01 AND date_value <= 2000-12-31
- HAVING date_value >= 2000-01-01 AND date_value <= 2000-12-31
- HAVING year=2000
Nothing seems to work. Could you help me with this please? Here is a picture of my database if it can help: 
