Hi Abhineet_SISL ,
I read your question many times but couldn’t find out the problem you meet clearly.
1. Would you please let us know what the expected result is?
ex.
customer unique bill date Unit Paymentdatetime
————————————————————————
1234567 2018-01-01. 93. 2018-01-30 00:00:00
1234567. 2018-01-12. 100. 2018-01-30 00:00:00
etc.
2. Would you please let us know the result you get with the SQL script you tried? I didn’t find out the output of your first query.
If you can clarify those 2 issues above, we may help you figure out the answer, as long as your explanations are sufficient for analyzing.
Regards,
Sten