SELECT
mi.nick_name,
mi.mobile_phone,
mi.avatar_url,
mi.member_id,
po.marketing_game_flow_no,
SUM(paid_amount) AS distributionSum
FROM
dgtools_pay_order AS po
LEFT JOIN biz_member_info AS mi ON po.sharer_id = mi.member_id
WHERE
1=1
<< AND po.marketing_game_flow_no = :marketingGameFlowNo >>
<< AND po.order_status = :orderStatus >>
<< AND po.pay_status = :payStatus >>
GROUP BY
po.sharer_id
ORDER BY
distributionSum DESC