(mysqli): SELECT p.first, opt.nickname FROM player p LEFT JOIN player_opt opt ON p.id = opt.player_id WHERE p.id = 27749
(mysqli): SELECT pts.points as points, bonus_p.points as ppts, bonus_b.points as bpts, pts.action, e.date as date, e.points_multiplier as points_multiplier, e.id as eid, e.name as ename, t.id as tid, t.nickname as tname, t.abbreviation as tabbr, l.id as lid, l.name as lname FROM (SELECT event_id, SUM(points) AS points, SUBSTRING_INDEX(GROUP_CONCAT(action ORDER BY points DESC, id ASC), ',', 1) AS action, MAX(id) AS sort_id FROM player_pts WHERE player_id = 27749 GROUP BY event_id) pts LEFT JOIN (SELECT event_id, SUM(points) AS points FROM participation_points WHERE player_id = 27749 GROUP BY event_id) bonus_p ON bonus_p.event_id = pts.event_id LEFT JOIN (SELECT event_id, SUM(points) AS points FROM bounty_points WHERE player_id = 27749 GROUP BY event_id) bonus_b ON bonus_b.event_id = pts.event_id LEFT JOIN event e ON e.id = pts.event_id LEFT JOIN tournament t ON t.id = e.tournament_id LEFT JOIN location l ON l.id = e.location_id ORDER BY e.date DESC, pts.sort_id DESC