我正在尝试使用带有Server的Grafana时间序列显示用户每天的增长情况。然而,我发现这些文档是没有帮助的,我的查询是不正确的。
以下内容为每天返回一个常量值1。我需要更改什么来显示每天创建的新用户的数量?
先谢谢你。
SELECT
$__timeGroup([created_at],'1d') as time,
COUNT(id) as value,
'users' as metric
FROM [db].[user]
WHERE $__timeFilter([created_at])
GROUP BY [created_at]
ORDER BY 1发布于 2022-09-30 13:01:51
这对我来说很管用:
SELECT
$__timeGroup(created_at, '1d') AS time,
COUNT(id) as 'New Users'
FROM [db].[user]
GROUP BY $__timeGroup(created_at, '1d')
ORDER BY 1https://stackoverflow.com/questions/73908725
复制相似问题