Re: [SQL] Grouping by day, limiting amounts

2006-10-19 Thread Jim C. Nasby
On Thu, Oct 19, 2006 at 01:51:55PM +0200, Mezei Zolt??n wrote: > > Hi, > I didn't really know what subject I should give. > I have a table like this one: > 2006.10.01.Bela10 > 2006.10.01.Aladar9 > 2006.10.01.Cecil8 > 2006.10.01.Dezso7 > 2006.10.01.Elemer6 >

Re: [SQL] [HACKERS] Bug?

2006-10-19 Thread Jim C. Nasby
See section 9.12 of the docs. On Thu, Oct 19, 2006 at 12:28:58PM +0530, Indira Muthuswamy wrote: > Then how do we clear the values of a serial column(is it done only by > dropping the column?)? > > Regards, > M.Indira > > > > On 10/19/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > > >Moving t

Re: [SQL] Grouping by day, limiting amounts

2006-10-19 Thread Woody Woodring
I came into this thread late, so I don't know what you schema looks like. I have a table that has a timestamp with time zone field and other data. I can write a query that give me a count per day SELECT count(*) AS count, date_trunc( 'day', hour) AS day FROM hist_callhealth GROUP BY day; Thi

Re: [SQL] Grouping by day, limiting amounts

2006-10-19 Thread A. Kretschmer
am Thu, dem 19.10.2006, um 6:55:41 -0700 mailte chester c young folgendes: > --- "A. Kretschmer" <[EMAIL PROTECTED]> wrote: > > > > I would like to select the 3 (or 10) names with the most votes for > > each day. > > > > > > Any suggestions on how can it be done easily? > > Am I misunderstandi

Re: [SQL] Grouping by day, limiting amounts

2006-10-19 Thread A. Kretschmer
am Thu, dem 19.10.2006, um 13:51:55 +0200 mailte Mezei Zoltán folgendes: > Hi, > > I didn't really know what subject I should give. > > I have a table like this one: > > 2006.10.01.    Bela    10 > 2006.10.01.    Aladar    9 > 2006.10.01.    Cecil    8 > 2006.10.01.    Dezso    7 > 2006.10.01.

[SQL] Grouping by day, limiting amounts

2006-10-19 Thread Mezei Zoltán
Hi, I didn't really know what subject I should give. I have a table like this one: 2006.10.01.    Bela    10 2006.10.01.    Aladar    9 2006.10.01.    Cecil    8 2006.10.01.    Dezso    7 2006.10.01.    Elemer    6 2006.10.02.    Bela    11 2006.10.02.    Aladar    10 2006.10.02.    Cecil