text 交易统计

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 交易统计相关的知识,希望对你有一定的参考价值。

SELECT 
deals.id, products.name as product, deals_tmp.geo, departments.name as department, DATE(deals.created_at), deals.usd_summary, deals_tmp.ad_url, deals_tmp.ad_places, deals_tmp.results, deals_tmp.wallet_type as payment_method, deals_tmp.extention, deals_tmp.cost_item, deals_tmp.about,

CASE
    WHEN deals_tmp.id IS NULL THEN "CRM"
    ELSE "GOOGLE DOCS"
END
FROM `deals` 
LEFT JOIN `deals_tmp` ON `deals`.`id` = `deals_tmp`.`deal_id` 
LEFT JOIN `departments` ON `deals`.`department_id` = `departments`.`id` 
LEFT JOIN `partners` ON `partners`.`id` = `deals`.`partner_id` LEFT JOIN `products` ON `products`.`id` = `partners`.`product_id` 
WHERE `deals`.`created_at` BETWEEN '2019-08-01 00:00:00.000000' AND '2019-08-31 23:59:59.000000' AND `deals`.`status` = 'active'
ORDER BY `deals`.`id` DESC

以上是关于text 交易统计的主要内容,如果未能解决你的问题,请参考以下文章

配对交易-基于时间序列协整关系的统计套利

统计交易消耗的平均时间

统计是程序化学习的第一步!

hive统计每五分钟交易量SQL

Pandas - 按用户统计一系列交易活动 [关闭]

统计交易消耗的平均时间