From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Grouping by day, limiting amounts |
Date: | 2006-10-19 14:17:36 |
Message-ID: | 20061019141736.GD10803@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
am Thu, dem 19.10.2006, um 6:55:41 -0700 mailte chester c young folgendes:
> --- "A. Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> 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 misunderstanding, or can you write a simple:
>
> select * from <table> where <date>='2006-10-10'
> limit 5 order by <vote_ct> desc;
From the first mail:
"I would like to select the 3 (or 10) names with the most votes for each day."
_FOR_ _EACH_ _DAY_.
Your query returns the values only for one day...
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Woody Woodring | 2006-10-19 14:45:26 | Re: Grouping by day, limiting amounts |
Previous Message | A. Kretschmer | 2006-10-19 12:30:19 | Re: Grouping by day, limiting amounts |