From: Mezei Zoltán <mezei.zoltan@telefor.hu>
To: pgsql-sql@postgresql.org
Subject: Grouping by day, limiting amounts
Date: Thu, 19 Oct 2006 13:51:55 +0200
Message-ID: <453766DB.6000408@telefor.hu> (raw)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000099">
<font size="-1"><font face="Tahoma">Hi,<br>
<br>
I didn't really know what subject I should give.<br>
<br>
I have a table like this one:<small><br>
<br>
</small></font></font><small><font face="Tahoma">2006.10.01. Bela
10<br>
2006.10.01. Aladar 9<br>
2006.10.01. Cecil 8<br>
2006.10.01. Dezso 7<br>
2006.10.01. Elemer 6<br>
2006.10.02. Bela 11<br>
2006.10.02. Aladar 10<br>
2006.10.02. Cecil 9<br>
2006.10.02. Dezso 8<br>
2006.10.02. Ferenc 7<br>
2006.10.03. Bela 6<br>
2006.10.03. Aladar 5<br>
2006.10.03. Cecil 4<br>
2006.10.03. Dezso 3<br>
2006.10.03. Jozef 2<br>
<br>
The first column is a date, the second is a name, the third is the
number of votes that the name received on that day.<br>
<br>
I would like to select the 3 (or 10) names with the most votes for each
day.<br>
<br>
Any suggestions on how can it be done easily?<br>
<br>
Thanks,<br>
<br>
Zizi<br>
</font></small>
</body>
</html>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mezei.zoltan@telefor.hu
Subject: Re: Grouping by day, limiting amounts
In-Reply-To: <453766DB.6000408@telefor.hu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox