Guest User

Untitled

a guest
Sep 17th, 2021
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT m.id,m.nom,m.email,SUM(CASE WHEN su.paid>0 THEN su.expected_amount ELSE 0 END) AS paye,SUM(su.expected_amount) AS total FROM membres m LEFT OUTER JOIN services_users su ON su.id_user = m.id GROUP BY m.id,m.nom,m.email ORDER BY nom ASC
RAW Paste Data