要做一个时间趋势图,统计指标是店数和评分数。时间分类:日 取每天的日期;周,取当前周第一天;月,当前月初的一天。统计指标:店数和评分数,日,展示每天的店数和评分数;周,展示当前周日的评分数和店数;月,展示所在月最后一天的评分数和店数。请教一个sql怎么写?用一个数据集展示日周月数据select date_format(part_dt,'%Y-%m-%d') as part_dt, date_sub(part_dt,INTERVAL WEEKDAY(part_dt) DAY) as part_dt_W, --当前week的第一天 DATE_ADD(part_dt,interval -day(part_dt)+1 day) as part_dt_M, -----当前月的月初一天 store_code(怎么取到周月的店数), store_score(怎么取到周月的分数)from ads_platform_store_day where 1=1 ${IF(frequency="1","AND part_dt >= '"+format(dateinweek(endDate,1),'yyyyMMdd')+"' AND part_dt<= '"+format(endDate,'yyyyMMdd')+"'" ,IF(frequency="2","AND part_dt >= '"+format(datedelta(endDate,-42),'yyyyMMdd')+"' AND part_dt<= '"+format(endDate,'yyyyMMdd')+"'",IF(frequency="3","AND part_dt >= '"+format(monthdelta(endDate,-13),'yyyyMMdd')+"' AND part_dt<= '"+format(endDate,'yyyyMMdd')+"'","")))}and store_code in ( '${store_code}')