3 ms·
Why not just GROUP BY to_char(timestamp, some_format) / extract(something from timestamp)?
by blattimwind 8y ago
Why not just GROUP BY to_char(timestamp, some_format) / extract(something from timestamp)?
- dpcx 8y agoI assume because that doesn't give the 0 results in the query. The RCTE would.
- blattimwind 8y agoAh right. generate_series() might be another, possibly simpler way, to generate a time-series independent of what data in the relation actually exists and then join and group that series to the data relation.