SELECT user_id, current_timestamp AS granted_at
FROM gamification_scores
WHERE (:backfill OR user_id IN (:user_ids))
GROUP BY 1
HAVING SUM(score) > 9000
Can that query be limited by year, monthly or three months?
SELECT user_id, current_timestamp AS granted_at
FROM gamification_scores
WHERE (:backfill OR user_id IN (:user_ids))
GROUP BY 1
HAVING SUM(score) > 9000
Can that query be limited by year, monthly or three months?