Skip to content

Instantly share code, notes, and snippets.

@almet
Last active June 4, 2025 18:32
Show Gist options
  • Save almet/2d2821ddeaf94481cf6ceb416391ac6d to your computer and use it in GitHub Desktop.
Save almet/2d2821ddeaf94481cf6ceb416391ac6d to your computer and use it in GitHub Desktop.
ihatemoney.org stats
SELECT COUNT(*)
FROM project
WHERE id IN (
SELECT p.project_id
FROM bill b
JOIN person p ON b.payer_id = p.id
GROUP BY p.project_id
HAVING COUNT(*) > 10
AND MAX(b.date) > CURRENT_DATE - INTERVAL '90 days'
);
date count
2025-02-25 1026
2025-06-04 1125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment