This query means to find users whose TOTAL exceeds 50 — but it filters individual orders over 50 in WHERE, so maya (40+60=100) shows a wrong total and marcus/riley vanish for the wrong reason. Fix it to filter group totals with HAVING so it prints [('maya', 100.0)].
The break is on line 13 — but read the whole snippet first.