Created
May 19, 2011 12:38
-
-
Save choplin/980648 to your computer and use it in GitHub Desktop.
Solution of Project Euler #1 with PostgreSQL
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 | |
sum(num) | |
FROM | |
generate_series(1, 999) AS t(num) | |
WHERE | |
(num % 3) = 0 | |
OR (num % 5) = 0 | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment