feat(coderd/database): use template_usage_stats in GetUserActivityInsights query (#12672)

This PR updates the `GetUserActivityInsights` query to use rolled up `template_usage_stats` instead of raw agent and app stats.
This commit is contained in:
Mathias Fredriksson
2024-03-25 16:16:41 +02:00
committed by GitHub
parent a8ed689bda
commit 2332d8197a
12 changed files with 247 additions and 265 deletions
@@ -16,7 +16,7 @@
"user_id": "00000000-0000-0000-0000-000000000004",
"username": "user1",
"avatar_url": "",
"seconds": 30540
"seconds": 26820
},
{
"template_ids": [
@@ -16,7 +16,7 @@
"user_id": "00000000-0000-0000-0000-000000000004",
"username": "user1",
"avatar_url": "",
"seconds": 30540
"seconds": 26820
},
{
"template_ids": [
@@ -16,7 +16,7 @@
"user_id": "00000000-0000-0000-0000-000000000004",
"username": "user1",
"avatar_url": "",
"seconds": 23280
"seconds": 23160
},
{
"template_ids": [
@@ -16,7 +16,7 @@
"user_id": "00000000-0000-0000-0000-000000000004",
"username": "user1",
"avatar_url": "",
"seconds": 29820
"seconds": 26100
},
{
"template_ids": [
@@ -16,7 +16,7 @@
"user_id": "00000000-0000-0000-0000-000000000004",
"username": "user1",
"avatar_url": "",
"seconds": 29820
"seconds": 26100
},
{
"template_ids": [