Required query to achieve Teradata scenario

Database
dev
Visitor

Required query to achieve Teradata scenario

Hi SME's ,

 

I have a scenario where I required the below output.

Can anyone plese let me know how to achive this output.

 

scenario.png

Thanks,

Dev.

1 REPLY
Junior Contributor

Re: Required query to achieve Teradata scenario

Why is there no row returned for 24/10/2018 01:01:00  24/10/2018 01:01:15?

How do you sort your data to get your example order?

What if there's an ON row for 25/11/2018 before 01:03:00?