重现步骤
反馈人:袁慧斌
数据库:zhcxkj_center_bi
查询时间:11.2706
扫描行数:2554.8
发送行数:999.702
指纹SQL: ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date <= '?' then page_views else ? end ) as sessions , sum ( case when report_date > '?' then page_views else ? end ) as pageViews , sum ( case when report_date <= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date > '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date >= '?' and report_date <= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date <= '?' then page_views else ? end ) as sessions , sum ( case when report_date > '?' then page_views else ? end ) as pageViews , sum ( case when report_date <= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date > '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date >= '?' and report_date <= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date <= '?' then page_views else ? end ) as sessions , sum ( case when report_date > '?' then page_views else ? end ) as pageViews , sum ( case when report_date <= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date > '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date >= '?' and report_date <= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date <= '?' then page_views else ? end
真实SQL:( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-06-06 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-06-06 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08N6FTJ4J' and report_date >= '2025-05-23 00:00:00' and report_date <= '2025-06-21 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-04-11 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-04-11 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08TWSBWV1' and report_date >= '2025-03-28 00:00:00' and report_date <= '2025-04-26 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-07-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-07-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CSY15WW' and report_date >= '2025-06-20 00:00:00' and report_date <= '2025-07-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-06-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-06-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTST8C5' and report_date >= '2025-05-21 00:00:00' and report_date <= '2025-06-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-05-29 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-05-29 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTY3Z96' and report_date >= '2025-05-15 00:00:00' and report_date <= '2025-06-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CYTY8TJ' and report_date >= '2025-07-15 00:00:00' and report_date <= '2025-07-24 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2024-07-15 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2024-07-15 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3HFM43' and report_date >= '2024-07-01 00:00:00' and report_date <= '2024-07-30 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2024-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2024-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3RS92T' and report_date >= '2024-07-05 00:00:00' and report_date <= '2024-08-03 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-06-28 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-06-28 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3W1JLW' and report_date >= '2025-06-14 00:00:00' and report_date <= '2025-07-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2025-02-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2025-02-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D9326C9' and report_date >= '2025-02-05 00:00:00' and report_date <= '2025-03-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2024-10-22 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2024-10-22 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date > '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09DKDD8RS' and report_date >= '2024-10-08 00:00:00' and report_date <= '2024-11-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date <= '2024-12-05 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date > '2024-12-05 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date <= '2024-12-05 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case whe...;
##袁慧斌,人工修改过##
AISQL修改建议:SQL 过于复杂 请拆分成独立模块
explain表:
额外建议:
索引建议:

历史记录  
  1. 2025-08-05 09:32:07, 由 陈莉珍 创建。
  2. 2025-08-05 09:34:03, 由 陈莉珍 编辑。
    修改了 所属项目,旧值为 "51",新值为 "52"。
    修改了 所属模块,旧值为 "0",新值为 "1832"。
    修改了 业务部门,旧值为 "0",新值为 "2"。
    修改了 解决时效,旧值为 "0",新值为 "-1"。
    修改了 重现步骤,区别为:
    001- 反馈人:袁慧斌
    001+ 反馈人:袁慧斌 数据库:zhcxkj_center_bi 查询时间:11.2706 扫描行数:2554.8 发送行数:999.702 指纹SQL: ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end 真实SQL:( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-06 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-06 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08N6FTJ4J' and report_date &gt;= '2025-05-23 00:00:00' and report_date &lt;= '2025-06-21 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-04-11 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-04-11 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08TWSBWV1' and report_date &gt;= '2025-03-28 00:00:00' and report_date &lt;= '2025-04-26 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CSY15WW' and report_date &gt;= '2025-06-20 00:00:00' and report_date &lt;= '2025-07-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTST8C5' and report_date &gt;= '2025-05-21 00:00:00' and report_date &lt;= '2025-06-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-05-29 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-05-29 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTY3Z96' and report_date &gt;= '2025-05-15 00:00:00' and report_date &lt;= '2025-06-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CYTY8TJ' and report_date &gt;= '2025-07-15 00:00:00' and report_date &lt;= '2025-07-24 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-15 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-15 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3HFM43' and report_date &gt;= '2024-07-01 00:00:00' and report_date &lt;= '2024-07-30 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3RS92T' and report_date &gt;= '2024-07-05 00:00:00' and report_date &lt;= '2024-08-03 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-28 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-28 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3W1JLW' and report_date &gt;= '2025-06-14 00:00:00' and report_date &lt;= '2025-07-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-02-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-02-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D9326C9' and report_date &gt;= '2025-02-05 00:00:00' and report_date &lt;= '2025-03-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-10-22 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-10-22 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09DKDD8RS' and report_date &gt;= '2024-10-08 00:00:00' and report_date &lt;= '2024-11-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-12-05 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-12-05 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-12-05 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case whe...; ##袁慧斌,人工修改过## AISQL修改建议:SQL 过于复杂 请拆分成独立模块 explain表: 额外建议: 索引建议:
    002- 数据库:zhcxkj_center_bi
    003- 查询时间:11.2706
    004- 扫描行数:2554.8
    005- 发送行数:999.702
    006- 指纹SQL: ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end
    007- 真实SQL:( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-06 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-06 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08N6FTJ4J' and report_date &gt;= '2025-05-23 00:00:00' and report_date &lt;= '2025-06-21 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-04-11 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-04-11 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08TWSBWV1' and report_date &gt;= '2025-03-28 00:00:00' and report_date &lt;= '2025-04-26 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CSY15WW' and report_date &gt;= '2025-06-20 00:00:00' and report_date &lt;= '2025-07-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTST8C5' and report_date &gt;= '2025-05-21 00:00:00' and report_date &lt;= '2025-06-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-05-29 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-05-29 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTY3Z96' and report_date &gt;= '2025-05-15 00:00:00' and report_date &lt;= '2025-06-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CYTY8TJ' and report_date &gt;= '2025-07-15 00:00:00' and report_date &lt;= '2025-07-24 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-15 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-15 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3HFM43' and report_date &gt;= '2024-07-01 00:00:00' and report_date &lt;= '2024-07-30 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3RS92T' and report_date &gt;= '2024-07-05 00:00:00' and report_date &lt;= '2024-08-03 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-28 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-28 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3W1JLW' and report_date &gt;= '2025-06-14 00:00:00' and report_date &lt;= '2025-07-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-02-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-02-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D9326C9' and report_date &gt;= '2025-02-05 00:00:00' and report_date &lt;= '2025-03-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-10-22 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-10-22 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09DKDD8RS' and report_date &gt;= '2024-10-08 00:00:00' and report_date &lt;= '2024-11-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-12-05 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-12-05 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-12-05 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case whe...;
    008- ##袁慧斌,人工修改过##
    009- AISQL修改建议:SQL 过于复杂 请拆分成独立模块
    010- explain表:
    011- 额外建议:
    012- 索引建议:
    013-
    001- 反馈人:袁慧斌<br />
    001+ 反馈人:袁慧斌<br /> 数据库:zhcxkj_center_bi<br /> 查询时间:11.2706<br /> 扫描行数:2554.8<br /> 发送行数:999.702<br /> 指纹SQL: ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end<br /> 真实SQL:( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-06 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-06 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08N6FTJ4J' and report_date &gt;= '2025-05-23 00:00:00' and report_date &lt;= '2025-06-21 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-04-11 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-04-11 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08TWSBWV1' and report_date &gt;= '2025-03-28 00:00:00' and report_date &lt;= '2025-04-26 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CSY15WW' and report_date &gt;= '2025-06-20 00:00:00' and report_date &lt;= '2025-07-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTST8C5' and report_date &gt;= '2025-05-21 00:00:00' and report_date &lt;= '2025-06-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-05-29 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-05-29 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTY3Z96' and report_date &gt;= '2025-05-15 00:00:00' and report_date &lt;= '2025-06-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CYTY8TJ' and report_date &gt;= '2025-07-15 00:00:00' and report_date &lt;= '2025-07-24 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-15 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-15 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3HFM43' and report_date &gt;= '2024-07-01 00:00:00' and report_date &lt;= '2024-07-30 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3RS92T' and report_date &gt;= '2024-07-05 00:00:00' and report_date &lt;= '2024-08-03 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-28 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-28 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3W1JLW' and report_date &gt;= '2025-06-14 00:00:00' and report_date &lt;= '2025-07-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-02-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-02-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D9326C9' and report_date &gt;= '2025-02-05 00:00:00' and report_date &lt;= '2025-03-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-10-22 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-10-22 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09DKDD8RS' and report_date &gt;= '2024-10-08 00:00:00' and report_date &lt;= '2024-11-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-12-05 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-12-05 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-12-05 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case whe...;<br /> ##袁慧斌,人工修改过##<br /> AISQL修改建议:SQL 过于复杂 请拆分成独立模块<br /> explain表:<br /> 额外建议:<br /> 索引建议:<br /><br />
    002- 数据库:zhcxkj_center_bi<br />
    003- 查询时间:11.2706<br />
    004- 扫描行数:2554.8<br />
    005- 发送行数:999.702<br />
    006- 指纹SQL: ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end ) as sessions , sum ( case when report_date &gt; '?' then page_views else ? end ) as pageViews , sum ( case when report_date &lt;= '?' then browser_page_views_percentage else ? end ) as browserSessionPercentage , sum ( case when report_date &gt; '?' then browser_page_views_percentage else ? end ) as browserPageViewsPercentage FROM ? where source_id = ? and child_asin = '?' and report_date &gt;= '?' and report_date &lt;= '?' GROUP by source_id , child_asin ) union all ( select source_id , child_asin , max ( report_date ) as reportDate , sum ( case when report_date &lt;= '?' then page_views else ? end<br />
    007- 真实SQL:( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-06 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-06 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-06 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08N6FTJ4J' and report_date &gt;= '2025-05-23 00:00:00' and report_date &lt;= '2025-06-21 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-04-11 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-04-11 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-04-11 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B08TWSBWV1' and report_date &gt;= '2025-03-28 00:00:00' and report_date &lt;= '2025-04-26 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CSY15WW' and report_date &gt;= '2025-06-20 00:00:00' and report_date &lt;= '2025-07-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-04 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-04 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-04 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTST8C5' and report_date &gt;= '2025-05-21 00:00:00' and report_date &lt;= '2025-06-19 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-05-29 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-05-29 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-05-29 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CTY3Z96' and report_date &gt;= '2025-05-15 00:00:00' and report_date &lt;= '2025-06-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09CYTY8TJ' and report_date &gt;= '2025-07-15 00:00:00' and report_date &lt;= '2025-07-24 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-15 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-15 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-15 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3HFM43' and report_date &gt;= '2024-07-01 00:00:00' and report_date &lt;= '2024-07-30 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-07-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-07-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-07-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3RS92T' and report_date &gt;= '2024-07-05 00:00:00' and report_date &lt;= '2024-08-03 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-06-28 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-06-28 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-06-28 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D3W1JLW' and report_date &gt;= '2025-06-14 00:00:00' and report_date &lt;= '2025-07-13 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2025-02-19 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2025-02-19 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2025-02-19 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09D9326C9' and report_date &gt;= '2025-02-05 00:00:00' and report_date &lt;= '2025-03-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-10-22 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-10-22 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case when report_date &gt; '2024-10-22 00:00:00' then browser_page_views_percentage else 0 end ) as browserPageViewsPercentage from t_amz_sales_and_traffic_report_asin where source_id = 13332 and child_asin = 'B09DKDD8RS' and report_date &gt;= '2024-10-08 00:00:00' and report_date &lt;= '2024-11-06 00:00:00' GROUP by source_id,child_asin ) union all ( select source_id,child_asin,max(report_date) as reportDate, sum(case when report_date &lt;= '2024-12-05 00:00:00' then page_views else 0 end ) as sessions , sum(case when report_date &gt; '2024-12-05 00:00:00' then page_views else 0 end ) as pageViews, sum(case when report_date &lt;= '2024-12-05 00:00:00' then browser_page_views_percentage else 0 end ) as browserSessionPercentage, sum(case whe...;<br />
    008- ##袁慧斌,人工修改过##<br />
    009- AISQL修改建议:SQL 过于复杂 请拆分成独立模块<br />
    010- explain表:<br />
    011- 额外建议:<br />
    012- 索引建议:<br />
    013- <br />
  3. 2025-08-05 10:12:09, 由 覃光贤 指派给 温科。
    修改了 指派给,旧值为 "qinguangxian",新值为 "wenke"。
  4. 2025-08-05 10:25:09, 由 温科 编辑。
    修改了 解决时效,旧值为 "0",新值为 "-1"。
  5. 2025-08-05 10:32:30, 由 温科 指派给 陈莉珍。
    修改了 指派给,旧值为 "wenke",新值为 "chenlizhen"。

    CPU太高  导致sql执行太慢

  6. 2025-08-05 20:00:21, 由 陈莉珍 解决,方案为 服务器原因 。
    修改了 解决方案,旧值为 "",新值为 "server"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2025-08-05 20:00:15"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "chenlizhen"。
  7. 2025-08-05 20:00:57, 由 陈莉珍 编辑。
    修改了 开发责任人,旧值为 "",新值为 "wenke"。
    修改了 测试责任人,旧值为 "",新值为 "wenke"。
    修改了 解决时效 ,旧值为 "0",新值为 "10.47"。
    修改了 上线时间 ,旧值为 "0000-00-00 00:00:00",新值为 "2025-08-05 10:35"。
    修改了 上线时效 ,旧值为 "-1",新值为 "1.05"。
  8. 2025-08-05 20:01:04, 由 陈莉珍 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "chenlizhen",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "chenlizhen"。
    修改了 关闭日期,旧值为 "",新值为 "2025-08-05 20:01:04"。
所属项目 智能中心-需求池
所属模块 虎鲸系统(有品)
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 总经办
影响功能
开发责任人 温科
测试责任人 温科
解决时效 10.47
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-08-05 20:01:04
截止日期 0000-00-00
上线时间 2025-08-05 10:35:00
上线时效 1.05
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 陈莉珍 于 2025-08-05 09:32:07
影响环境 生产环境-业务反馈
由谁解决 陈莉珍 于 2025-08-05 20:00:15
解决版本 主干
解决方案 服务器原因
由谁关闭 陈莉珍 于 2025-08-05 20:01:04
最后修改 陈莉珍 于 2025-08-05 20:01:04
相关Bug