string(601) "SELECT t.title, t.ff_prefix, t.id, c.id AS tur_cat_id, c.ff_name, max(m.ff_date) as datee, min(m.ff_date) as dates, c.ff_dubli, c.ff_unofficial FROM `ff_match` m INNER JOIN `ff_match_player` p ON p.item = m.id INNER JOIN `ff_tournamentmain` t ON t.id = m.ff_turmain1 INNER JOIN ff_tournamentcategory c ON c.id = t.l_category WHERE m.ff_date is not null AND m.ff_date > '0000-00-00' and p.l_value = '59038' and m.l_matchvalidity not in (2,9) GROUP BY ff_turmain1 ORDER BY tur_cat_id, c.ff_order, t.title, t.ff_prefix"