2017-09-28 7 views

答えて

1
SELECT MOBILE,SUM(VALUE) as speding 
FROM crm_transaction 
WHERE MOBILE IN (SELECT DISTINCT MOBILE FROM crm_transaction) 
group by mobile 
+0

それはうまくいく、ありがとう。 –

1

これは、あなたが時間を格納する列の実際の名前とTIME_FRAMEを変更する必要が

select mobile, sum('value') as speding 
from crm_transaction 
where time_frame between '<time from>' and '<time to>' 
group by mobile 
order by speding desc limit 10 

仕事に>から>から<時間と<時間を変更する必要がありますあなたの所望の時間値。

+0

それはうまくいく、ありがとう! –

関連する問題