An Azure relational database service.
Hi Expert,
there is condition when value is same for the status then it should take min date and if the value is change for the status then max date
create table test
(newdate datetime,status varchar(10), value varchar(10))
insert into test
values
('2022-01-04 18:00:57','Newone','segmentone'),('2022-01-04 19:00:57','Newone','segmentone'),
('2022-04-04 18:00:57','Newtwo','segmenthee'),('2022-04-04 19:00:57','Newtwo','segmenfour')
expected output
('2022-01-04 18:00:57','Newone','segmentone')
('2022-04-04 19:00:57','Newtwo','segmentfour')