View difference between Paste ID: f489c9da6 and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | SELECT COUNT(*) AS total_days |
2 | FROM (SELECT date '2008-8-26' + generate_series(0, (date '2008-9-1' - date '2008-8-26')) as all_days) AS calendar | |
3 | WHERE EXTRACT(isodow FROM all_days) < 6; | |
4 | -- based on http://pastebin.com/m4c143e84 |