Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Get distinct path list ordered by date in SQL

$
0
0

I have data that looks like this:

invoicedeptdate
12345Xfer Bills2022-03-05
12345Vendor Mgmt2023-07-15
12345Government2023-07-29
12345Vendor Mgmt2023-09-16
12345Government2023-11-25
12345Government2023-12-30
12345Government2024-02-03

What I am trying to get back is the following:

invoicedeptdate
12345Xfer Bills2022-03-05
12345Vendor Mgmt2023-07-15
12345Government2023-07-29
12345Vendor Mgmt2023-09-16
12345Government2023-11-25

I was thinking of trying to do a Lead or Lag and see if the next/previous had changed. I am trying to get a path of an invoice


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>