postgresql and report writing
Tim Chase
blinux.list at thechases.com
Fri Oct 24 18:54:26 UTC 2014
On October 24, 2014, Jude DaShiell wrote:
> Here's what is generated as an output report each weekday gets its
> own table and when time to produce a report another program drops
> all weekday tables then rebuilds the weekday tables with select
> statements.
Yeah, I had a pretty good idea what the resulting report looked
like. To tweak the SQL though, I'd need to have a better
understanding of the underlying table(s). Based on your description,
it sounds like the weekday-named tables are generated based on some
additional process that you run. Other things it would be handy to
know to simplify the SQL would be
- whether the "date" column contains just a date, or a time-stamp
that includes a time.
- if you intend to have the top report cover all time, or just the
most recent week, or do you purge out old data to get just the data
you want.
I've got a somewhat modified/simplified version of the query that I
don't have a good way to test out, but a few aspects of it depend on
answers to your questions above.
-tim
More information about the Blinux-list
mailing list