SELECT FROM_UNIXTIME(post_date), `thread_id`, `node_id`, `title`, `reply_count`, `view_count`, `user_id`, `username`, `post_date`, `sticky`, `discussion_state`, `discussion_open`, `discussion_type`, `first_post_id`, `first_post_likes`, `last_post_date`, `last_post_id`, `last_post_user_id`, `last_post_username`, `prefix_id`, `tags`
FROM xf_thread
WHERE post_date BETWEEN UNIX_TIMESTAMP('2016-01-01') AND UNIX_TIMESTAMP('2016-12-31')
ORDER BY view_count DESC