SELECT om.sofa_id as gl_id, om.turnir as turnir, om.sofa_turnir_id as turnir_id, om.begin_date as begin_date, om.team1_id as team1_id, om.team2_id as team2_id, om.team1 as team1, om.team2 as team2, om.score1 as score1, om.score2 as score2, om.sofa_status_id as status, ot.turnir_translation as translation FROM online_turnir_sofa ot, online_matches_sofa om WHERE om.begin_date >= '2019-08-29 00:00:00' AND om.begin_date <= '2019-09-05 00:00:00' AND om.sofa_turnir_id = ot.turnir_id AND ot.linked_category_id = 5 ORDER BY ot.turnir_weight DESC, om.sofa_turnir_id, om.begin_date