Re: [SQL] columns for count histograms of values

2008-05-01 Thread Alexy Khrabrov
Chester -- awesome! Exactly what the doctor ordered. Just one syntactic fix needed on 8.3.1: case when rating=1 then 1 else 0 end -- etc. Cheers, Alexy On Apr 30, 2008, at 4:12 PM, chester c young wrote: --- Alexy Khrabrov <[EMAIL PROTECTED]> wrote: Greetings -- I have a table of the

Re: [SQL] columns for count histograms of values

2008-04-30 Thread chester c young
--- Alexy Khrabrov <[EMAIL PROTECTED]> wrote: > Greetings -- I have a table of the kind > > Ratings: > id integer > rating smallint > > -- where value can take any value in the range 1 to 5. Now I want to > > have a statistical table Stats of the form > > id integer > min smallint > max sma

Re: [SQL] columns for count histograms of values

2008-04-30 Thread Mag Gam
Just curious, how are you planning to display the histogram? Are you allowed to use application code (C/C++/Perl, etc..) to generate the histogram? Personally, SQL is great for showing the data but not good for making graphs with data you can show. On Wed, Apr 30, 2008 at 5:01 PM, Alexy Khrabrov

[SQL] columns for count histograms of values

2008-04-30 Thread Alexy Khrabrov
Greetings -- I have a table of the kind Ratings: id integer rating smallint -- where value can take any value in the range 1 to 5. Now I want to have a statistical table Stats of the form id integer min smallint max smallint avg real r1 integer r2 integer r3 integer r4 integer r5 integer -