Jump to content
Main menu
Main menu
move to sidebar
hide
Social
Discord
Facebook
Twitter
Explore
Languages
Tasks
Random page
Rosetta Code
Search
Search
Create account
Log in
Personal tools
Dark mode
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Day of the week: Difference between revisions
Page
Discussion
English
Read
View source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
View source
View history
Refresh
General
Special pages
Printable version
Get shortened URL
← Older edit
Newer edit →
Day of the week
(view source)
Revision as of 08:58, 15 February 2023
384 bytes removed
,
1 year ago
→{{header|PostgreSQL}}
Revision as of 08:57, 15 February 2023
(
view source
)
Agonzalez
(
talk
|
contribs
)
(
→{{header|SQL}}
)
← Older edit
Revision as of 08:58, 15 February 2023
(
view source
)
Agonzalez
(
talk
|
contribs
)
(
→{{header|PostgreSQL}}
)
Newer edit →
Line 5,368:
FROM cte
where strftime('%w', dt) = '0';
</syntaxhighlight>
=={{header|PostgreSQL}}==
<syntaxhighlight lang="sql"> WITH RECURSIVE cte AS (
SELECT date '2008-12-25' + interval '12 month' * 0 as dt, 1 AS level
UNION ALL
SELECT date '2008-12-25' + interval '12 month' * level as dt, c.level + 1
FROM cte c
WHERE c.level <= 2121 - 2008 + 1
)
SELECT dt
FROM cte
where to_char(dt, 'Dy') = 'Sun';
</syntaxhighlight>
Agonzalez
11
edits
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
More information
OK
Toggle limited content width