feat: implement feed/stats/history/trends SQLite queries

This commit is contained in:
2026-05-04 18:42:45 +02:00
parent bb1337c5b1
commit f5fe8aeaff
14 changed files with 855 additions and 10 deletions

View File

@@ -105,7 +105,7 @@ impl UserRepository for SqliteUserRepository {
r#"SELECT u.id,
u.email,
COUNT(r.id) AS "total_movies!: i64",
AVG(CAST(r.rating AS REAL)) AS "avg_rating: Option<f64>"
AVG(CAST(r.rating AS REAL)) AS avg_rating
FROM users u
LEFT JOIN reviews r ON r.user_id = u.id
GROUP BY u.id, u.email