MySQL ERROR:

Error Number: 3065

Description: Expression #1 of ORDER BY clause is not in SELECT list, references column 'usr_ud06_165_3.t.sticky' which is not in SELECT list; this is incompatible with DISTINCT

Query: SELECT DISTINCT(t.entry_id) FROM exp_weblog_titles AS t LEFT JOIN exp_weblogs ON t.weblog_id = exp_weblogs.weblog_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id !='' AND t.entry_date < 1495695309 AND (t.expiration_date = 0 || t.expiration_date > 1495695309) AND exp_weblogs.is_user_blog = 'n' AND t.weblog_id = '1' AND exp_categories.cat_id = '17' AND t.status = 'open' ORDER BY t.sticky desc, t.entry_date desc LIMIT 32, 8