Expression #1 of ORDER BY clause is not in SELECT list, references column 'baza8826_kata_lo.mox_sites.sid' which is not in SELECT list; this is incompatible with DISTINCT