From: | Antonio Parrotta <antonioparrotta(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | sql basic question |
Date: | 2012-12-28 11:23:06 |
Message-ID: | CAByPMP+g1gWSb3=tkCGRXruf-xvwgGOX_-tkDJva9Sx_1oSxYQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi All,
I have this table:
LABEL ID Distance SIDE
"15"; 119006; 0.10975569030617; 1
"14"; 64054; 0.118448307450912; 0
"16"; 64055; 0.176240407317772; 0
"20"; 64057; 0.39363711745035; 0
"19"; 64056; 0.41205442839764; 1
"24"; 119007; 0.59758734628752; 0
What I want to achieve is a result table with min and max distance for each
side, limiting to 2 (basically the boundaries of each SIDE)
so the result should be:
LABEL ID Distance SIDE
"15"; 119006; 0.10975569030617; 1
"19"; 64056; 0.41205442839764; 1
"14"; 64054; 0.118448307450912; 0
"24"; 119007; 0.59758734628752; 0
Thanks a lot
- Antonio
y
From | Date | Subject | |
---|---|---|---|
Next Message | Anton Gavazuk | 2012-12-28 11:38:23 | Re: sql basic question |
Previous Message | msi77 | 2012-12-28 03:26:56 | Re: strange corruption? |