|
|
@ -6,7 +6,8 @@ select DISTINCT (count(order_id)) as count_ordernum ,client_moniker,active_time
|
|
|
|
from act_charity
|
|
|
|
from act_charity
|
|
|
|
left JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id
|
|
|
|
left JOIN pmt_transactions on act_charity.client_id = pmt_transactions.client_id
|
|
|
|
and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time>=act_charity.active_time
|
|
|
|
and pmt_transactions.transaction_type='Credit' and pmt_transactions.transaction_time>=act_charity.active_time
|
|
|
|
and pmt_transactions.refund_id is null and pmt_transactions.channel != 'Settlement'
|
|
|
|
and pmt_transactions.transaction_time<'2018-09-01'
|
|
|
|
|
|
|
|
and pmt_transactions.channel != 'Settlement'
|
|
|
|
GROUP BY act_charity.client_id order by sum_ordernum desc
|
|
|
|
GROUP BY act_charity.client_id order by sum_ordernum desc
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|