配置一般表格
配置柱状图
- 注意开头$__time(data_time), x轴作为$dimension的group by也要
SELECT
$__time(data_time),
sum(user_active) as '活跃用户',
$dimension
from $db_name.$table_name
where data_time=DATE_SUB(CURDATE(),INTERVAL 1 DAY)
and platform='$platform'
and date_type='one'
and app_ver!='' and app_ver in ("1.0.0","1.0.1","1.0.3","1.0.4")
group by $dimension
order by user_active desc
limit 20
配置折线图
- 注意$__time(data_time),$__timeFilter(data_time), 以及group by data_time, $dimension
SELECT
$__time(data_time),
sum(user_active) as '活跃用户',
$dimension
from $db_name.$table_name
where $__timeFilter(data_time)
and platform='$platform'
and date_type='one'
and app_ver!='' and app_ver in ("1.0.0","1.0.1","1.0.3","1.0.4")
group by data_time, $dimension
order by user_active desc
limit 20