SELECT * FROM ( ( SELECT n.*, na.title AS archive_title, na.jumpTo AS archive_jumpTo, 0 AS count_tags, 3 AS type FROM tl_news n LEFT JOIN tl_news_archive na ON n.pid = na.id WHERE n.pid='5' AND n.id!='327' AND (n.start = '' OR n.start < '1619185155') AND (n.stop = '' OR n.stop > '1619185155') AND n.published = 1 ORDER BY n.date DESC LIMIT 0 ) ) AS n GROUP BY n.id ORDER BY n.type ASC,n.count_tags DESC,n.date DESC LIMIT 0