Last active
February 25, 2025 11:47
-
-
Save almet/2d2821ddeaf94481cf6ceb416391ac6d to your computer and use it in GitHub Desktop.
ihatemoney stats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date | count | |
---|---|---|
2025-02-25 | 1026 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment