skip if latter value equal - Mailing list pgsql-sql

From Marcin Krawczyk
Subject skip if latter value equal
Date
Msg-id 95f6bf9b0907100022u41173cl2ef880a3952d3996@mail.gmail.com
Whole thread Raw
Responses Re: skip if latter value equal
List pgsql-sql
Hi list,<br /><br />I was wondering if it was possible for a field in SQL query to return NULL if latter value is
exactlythe same ? - for given ORDER BY clause, I guess.<br />For example, query returns:<br /><br />xxyy  1  4  true<br
/>xxyy  5  7  true<br />xxyy  21  8  true<br />yyzz  5  1 false<br />yyzz  7  7 false<br />yyzz  8  34 false<br /><br
/>I'dlike the output to be:<br /><br /> xxyy  1  4  true<br />NULL  5  7  NULL<br /> NULL  21  8  NULL<br /> yyzz  5  1
false<br/>NULL  7  7 NULL<br />NULL  8  34 NULL<br /><br />Is there any magical trick to achieve this ?<br /><br
clear="all"/>regards<br />mk<br /> 

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: FW: Query length limitation in postgres server > 8.2.9
Next
From: Pavel Stehule
Date:
Subject: Re: skip if latter value equal