Re: postgresql and report writing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is all the data in one table, and then are the monday/tuesday/etc
references all just views into the existing table?  Or do you have
the data duplicated into various tables?

Also, how malleable is the method with which you title them?  I'm not
sure what you're naming them, but it sounds like they just precede
each of the sections, one for "everything" and then one for each day
of the week.  Would it be acceptable to label the rows with the
labels in-line instead?

Without some actual data to work with, it's a little tough to come up
with something, but that query should readily be simplified based
on what I saw.  

-tim

On October 22, 2014, Jude DaShiell wrote:
> Hi Tim,
> 
> I'm using several select statements throughout the app as I now
> have it written.  A little later today, you'll be able to find it
> at http://www.shellworld.net/~jdashiel/health.zip since the whole
> app is over 300 lines in length.  The titles table that I now use
> just has a title number in it and the title text for each section
> of the report and this is producing useful and usable results.
> I've been told on an irc channel what I want to do with it next
> will require use of php.  Two figures I'd like to get in for each
> of the measurements are: ((max()-min())/3)+min()  start medium
> interval and ((max()-min())*2/3)+min() start high interval.
> That would provide more context for the other figures even if those 
> other figures couldn't be tagged with low, medium, or high.  sql
> has a problem with nesting of aggregates.  I tried storing max()
> and min() in a table then using those stored values to compute
> these two figures but it didn't work.  I dumpted that code that
> didn't work earlier.
> 
> On Thu, 9 Oct 2014, Tim Chase wrote:
> 
> > On October  9, 2014, Jude DaShiell wrote:
> > > I am using postgresql and found out I had to store report
> > > titles in a table and use select statements on that table to
> > > get postgresql to write those report headings to an output file
> > > as part of the calculated output. Not the most professional
> > > solution I'm sure but it works.
> > 
> > You shouldn't have to store the report titles in a table.  Could
> > you include the SQL SELECT statement that you're using?  This
> > should be pretty straight-forward.
> > 
> > -tim
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Blinux-list mailing list
> > Blinux-list@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/blinux-list
> > 
> > 
> 
> jude <jdashiel@xxxxxxxxxxxxxx>
> Twitter: @jdashiel
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/blinux-list

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]