error: SELECT distinct(a.asset_id), a.media, a.user_def_id, t2m.model_id, DATE_FORMAT(a.p_date, '%m.%d.%Y') as show_date, a.description, UNIX_TIMESTAMP(a.p_date) as f_date, t.free_link, t.tour_title, t.tour_description FROM mod2vid t2m, assets a, tour t WHERE (t2m.asset_id = a.asset_id) and (t.asset_id = a.asset_id) and t.site_id = '21' and a.hide_photo <> 'y' and t.tour_title <> '' and a.p_date <= '2017-11-20' and t2m.model_id = '1' group by a.asset_id order by t.tour_date desc