酷代码 AI
菜单
全部AI  /  AI问答
服务商

SELECT a.stat_date AS "订单日期", a.platform AS "平台", a.platform_user_name AS "店铺账号", a.platform_sku AS "平台sku", a.total_orders AS "订单数", a.total_qty AS "销量", a.total_price AS "销售额", a.total_ship_fee AS "运费", a.total_finalvaluefee AS "交易费", a.total_platformfee AS "手续费", a.currency AS "币种", IFNULL(((a.total_orders - b.total_orders) / b.total_orders) * 100, 0) AS "订单数环比值", IFNULL(((a.total_qty - b.total_qty) / b.total_qty) * 100, 0) AS "销量环比值", I

问题: SELECT a.stat_date AS "订单日期", a.platform AS "平台", a.platform_user_name AS "店铺账号", a.platform_sku AS "平台sku", a.total_orders AS "订单数", a.total_qty AS "销量", a.total_price AS "销售额", a.total_ship_fee AS "运费", a.total_finalvaluefee AS "交易费", a.total_platformfee AS "手续费", a.currency AS "币种", IFNULL(((a.total_orders - b.total_orders) / b.total_orders) * 100, 0) AS "订单数环比值", IFNULL(((a.total_qty - b.total_qty) / b.total_qty) * 100, 0) AS "销量环比值", IFNULL( ( ( CASE WHEN a.currency = 'USD' THEN (a.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN a.currency IN ('GBP', 'EUR') THEN (a.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 0 END - CASE WHEN b.currency = 'USD' THEN (b.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN b.currency IN ('GBP', 'EUR') THEN (b.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 0 END ) / CASE WHEN b.currency = 'USD' THEN (b.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN b.currency IN ('GBP', 'EUR') THEN (b.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 1 END ) * 100, 0 ) AS "销售额环比值", IFNULL(((a.total_orders - c.total_orders) / c.total_orders) * 100, 0) AS "订单数同比值", IFNULL(((a.total_qty - c.total_qty) / c.total_qty) * 100, 0) AS "销量同比值", IFNULL( ( ( CASE WHEN a.currency = 'USD' THEN (a.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN a.currency IN ('GBP', 'EUR') THEN (a.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 0 END - CASE WHEN c.currency = 'USD' THEN (c.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN c.currency IN ('GBP', 'EUR') THEN (c.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 0 END ) / CASE WHEN c.currency = 'USD' THEN (c.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN c.currency IN ('GBP', 'EUR') THEN (c.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 1 END ) * 100, 0 ) AS "销售额同比值", i.ShortText1742806216550 AS "币种名称", i.Number1742806223433 AS "汇率", a.total_price * IFNULL(i.Number1742806223433,0) AS "销售额(RMB)", CASE WHEN a.currency = 'USD' THEN i.Number1742806223433 WHEN a.currency IN ('GBP', 'EUR') THEN subquery.usd_rate ELSE NULL END AS "美元汇率", ROUND( CASE WHEN a.currency = 'USD' THEN (a.total_price * IFNULL(i.Number1742806223433,0)) / i.Number1742806223433 WHEN a.currency IN ('GBP', 'EUR') THEN (a.total_price * IFNULL(i.Number1742806223433,0)) / subquery.usd_rate ELSE 0 END, 3 ) AS "销售额(USD)" FROM ods.yc_daily_sales_by_product a LEFT JOIN ods.yc_daily_sales_by_product b ON a.platform = b.platform AND a.platform_user_name = b.platform_user_name AND a.platform_sku = b.platform_sku AND b.stat_date = DATE_SUB(a.stat_date, INTERVAL 1 DAY) LEFT JOIN ods.yc_daily_sales_by_product c ON a.platform = c.platform AND a.platform_user_name = c.platform_user_name AND a.platform_sku = c.platform_sku AND c.stat_date = DATE_SUB(a.stat_date, INTERVAL 1 YEAR) LEFT JOIN cloudpivot.i03ao_rate i ON YEAR(a.stat_date) = YEAR(i.Date1742805689343) AND MONTH(a.stat_da [2025-03-31 17:37:22 | AI问答 | 1757点数解答]

热门AI查看更多
“AI写代码神器”擅长各种语言编程、解释代码、注解补充。 在这里填写你的问题。如:写出java冒泡排序算法。
一个入口掌握所有。 在这输入任何问题,或者要AI输出的内容。
将阿拉伯数字转为人明币大写,如:数字1000转换为壹仟。
AI生成爆文标题,能够快速创作出极具吸引力的标题,促使短视频、自媒体文章的点击率与阅读量迅猛攀升。 此处填写一个原始标题,如:一般人怎样打理自身的社交圈?
AI生成新闻评论。 在这里填入新闻内容。
AI生成内容摘要。 在此处填入需要生成摘要的内容,还可以输入4000字。
AI生成主持词,擅长团建、年会、婚礼、节日等场合的主持词编写。 在这里填入主持场景,如:运动会
AI快速生成周报、月报、日报、年终总结等各类总结报告。 在这里简单输入工作目标、指标、成果,没有任何格式或特殊需求。如:计划年销售业绩1000万,实际完成800万。
输入一个字,显示以这个字开头的歇后语
输入一个字,显示以这个字开头的成语
极速在线生成证件照
极速更换证件照红、蓝、白底色
实用工具查看更多
阿里云99元2核2G服务器/年,199元2核4G服务器随心买。
生成随机密码,同时返回MD5、Base64、二进制和16进制格式。
Jquery在线手册 [开发类]
能迅速查询各类Jquery方法的详细使用说明与示例代码,适合新手探索Jquery的基础操作,也适合经验丰富的开发者进行复杂功能的实现,极大提升开发效率与质量。
20万人使用 进入Jquery在线手册
Linux在线手册 [开发类]
linux系统各个命令的详细解释和示例
15万人使用 进入Linux在线手册
今日油价 [生活类]
全国各省油价,实时更新。
1000万人使用 进入今日油价
英语单词速记 [学习类]
可进行单词速记、听音填词、生词本练习,提升英语单词学习效率。
5万人使用 进入英语单词速记
直连人力资源和社会保障政务服务平台的法定退休年龄计算器。
IntelliJ IDEA正版极速下载。
相关提问