Skip to Main Content

Display only max date rest needs to be null

palkodiAug 20 2018 — edited Aug 20 2018

create table ter (ID number, date_given date);

insert into ter values (1, to_date('01/01/2009','DD/MM/YYYY'));

insert into t values (1, to_date('01/02/2009','DD/MM/YYYY'));

insert into t values (1, to_date('01/03/2009','DD/MM/YYYY'));

insert into x values (1, to_date('01/04/2009','DD/MM/YYYY'));

insert into x values (1, to_date('03/05/2009','DD/MM/YYYY'));

insert into x values (1, to_date('03/29/2009','DD/MM/YYYY'));

insert into ter values (2, to_date('02/01/2009','DD/MM/YYYY'));

insert into t values (2, to_date('02/02/2009','DD/MM/YYYY'));

insert into t values (2, to_date('02/03/2009','DD/MM/YYYY'));

insert into x values (2, to_date('02/15/2009','DD/MM/YYYY'));

insert into x values (2, to_date('02/12/2009','DD/MM/YYYY'));

insert into x values (2, to_date('02/11/2009','DD/MM/YYYY'));

i want the output as

pastedImage_1.png

i want the third column with max date value and rest be null

This post has been answered by mNem on Aug 20 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Sep 17 2018
Added on Aug 20 2018
4 comments
90 views