Charles Clavadetscher wrote:
>> aklaver@test=> create table pr_test(x int, y int);
>>
>> aklaver@test=> select * from pr_test where (x, y) between (1, 3) and
>> (3,2) order by x,y;
>> x | y
>> ---+---
>> 1 | 3
>> 1 | 4
>> 2 | 1
>> 2 | 2
>> 2 | 3
>> 2 | 4
>> 3 | 1
>> 3 | 2
>
> +1
> aklaver@test=> create table pr_test(x int, y int);
>
> aklaver@test=> select * from pr_test where (x, y) between (1, 3) and
> (3,2) order by x,y;
> x | y
> ---+---
> 1 | 3
> 1 | 4
> 2 | 1
> 2 | 2
> 2 | 3
> 2 | 4
> 3 | 1
> 3 | 2
+1, nice.
--
Sent via pgsql-general mailing
On 10/05/2015 12:33 PM, Raymond O'Donnell wrote:
On 05/10/2015 20:08, Adrian Klaver wrote:
On 10/05/2015 12:00 PM, Raymond O'Donnell wrote:
On 05/10/2015 19:53, Adrian Klaver wrote:
On 10/05/2015 11:39 AM, Raymond O'Donnell wrote:
Hello all,
I have an SQL problem which ought to be simple, bu
On 05/10/2015 20:08, Adrian Klaver wrote:
> On 10/05/2015 12:00 PM, Raymond O'Donnell wrote:
>> On 05/10/2015 19:53, Adrian Klaver wrote:
>>> On 10/05/2015 11:39 AM, Raymond O'Donnell wrote:
Hello all,
I have an SQL problem which ought to be simple, but I can't get my head
aroun
On 05/10/2015 20:03, John McKown wrote:
> When in doubt, cheat! Why not something like:
>
> SELECT x, y FROM organ_pipes WHERE point(x,y) <@
> box(point(?x1,?y1),point(?x2,?y2)) ;
>
> This is definitely a different approach from the others that I've seen.
>
>
> Basically, think of your channel
On 05/10/2015 19:53, Adrian Klaver wrote:
> On 10/05/2015 11:39 AM, Raymond O'Donnell wrote:
>> Hello all,
>>
>> I have an SQL problem which ought to be simple, but I can't get my head
>> around it.
>>
>> I have pairs of integers - let's call them (x, y). In effect, x is a
>> category, while y is a
On 10/05/2015 12:00 PM, Raymond O'Donnell wrote:
On 05/10/2015 19:53, Adrian Klaver wrote:
On 10/05/2015 11:39 AM, Raymond O'Donnell wrote:
Hello all,
I have an SQL problem which ought to be simple, but I can't get my head
around it.
I have pairs of integers - let's call them (x, y). In effec
When in doubt, cheat! Why not something like:
SELECT x, y FROM organ_pipes WHERE point(x,y) <@
box(point(?x1,?y1),point(?x2,?y2)) ;
This is definitely a different approach from the others that I've seen.
Basically, think of your channel / piston as a point in a Cartesian plane.
And your boundar
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Raymond O'Donnell
Sent: Monday, October 05, 2015 2:40 PM
To: 'PostgreSQL'
Subject: [GENERAL] Selecting pairs of numbers
Hello all,
I have an SQL problem
On 10/05/2015 11:39 AM, Raymond O'Donnell wrote:
Hello all,
I have an SQL problem which ought to be simple, but I can't get my head
around it.
I have pairs of integers - let's call them (x, y). In effect, x is a
category, while y is an item within that category. For every x, there is
always the
I then might want to extract a list from, say, (1, 3) to (3, 2), giving:
x | y
-
1 | 3
1 | 4
2 | 1
2 | 2
2 | 3
2 | 4
3 | 1
3 | 2
For the life of me, I can't figure out how to do this.
Hi,
starting from this:
chris=# select * from t order by x,y;
x | y
---+---
1 | 1
1 | 2
1 | 3
1 |
Hello all,
I have an SQL problem which ought to be simple, but I can't get my head
around it.
I have pairs of integers - let's call them (x, y). In effect, x is a
category, while y is an item within that category. For every x, there is
always the same number of integers y; and both x and y are al
12 matches
Mail list logo