By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE TABLE
INSERT 0 13
ERROR: function date_bin(unknown, timestamp without time zone, timestamp without time zone) does not exist LINE 7: , date_bin('7 days', datetime, timestamp '2023-1-1') AS... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
ERROR: function date_bin(unknown, timestamp without time zone, timestamp without time zone) does not exist LINE 2: SELECT date_bin('7 days', datetime, timestamp '2023-1-1') AS... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
date_week | runing_total_id |
---|---|
2023-02-26 00:00:00 | 4 |
2023-03-05 00:00:00 | 9 |
2023-03-26 00:00:00 | 10 |
SELECT 3
must_be_sonday |
---|
Sun |
SELECT 1