> On May 22, 2020, at 1:37 PM, Michael Lewis wrote:
>
> I believe something like this is what you want. You might be able to do it
> without a sub-query by comparing the current name value to the lag value and
> null it out if it's the same.
> ...
Thanks, that's what I needed! (And better than
On Fri, May 22, 2020 at 12:38 PM Michael Lewis wrote:
> I believe something like this is what you want. You might be able to do it
> without a sub-query by comparing the current name value to the lag value
> and null it out if it's the same.
>
This. I misread the question. You might also consi
I believe something like this is what you want. You might be able to do it
without a sub-query by comparing the current name value to the lag value
and null it out if it's the same.
select
case when row_number = 1 then id end AS id,
case when row_number = 1 then name end as name,
phone.number
from
On Friday, May 22, 2020, Scott Ribe wrote:
> given, let's say:
>
> create table person (id int not null, name varchar);
> create table phone (id int not null, person_id int not null, number
> varchar);
>
> select person.*, phone.number from person join phone on (person.id =
> phone.person_id) ord