pub async fn fetch_analytics( pool: &DbPool, query: AnalyticsQuery, allowed_keys: HashSet<AllowedKey>, auth_as: Option<AuthenticateAs>, limit: u32) -> Result<Vec<FetchedAnalytics>, PoolError>