troubleshooting Question

Self JOIN Query help!!!

Avatar of RND2006
RND2006 asked on
Oracle DatabaseStorage Software
3 Comments1 Solution826 ViewsLast Modified:
There is a history table that contains the information about the location of an asset and its current owner with a date field. Table Name: asset_hist

Actual data in the table is as below;
Asset Number    Date Modified(Timestamp)            User Name      Description
123                      01-18-2008 11:20:01                   XYZ                Assigned  
123                      01-19-2008 08:20:01                   XYZ                Maintenance
123                      01-19-2008 11:09:09                   ABC                Assigned
123                      01-19-2008  12:01:10                  QPR                Assigned
123                      01-20-2008   09:10:05                 LMN                Assigned

But I need to show this information as below;
Asset Number    Date Modified            From User         To User
123                      01-19-2008               XYZ                   ABC
123                      01-19-2008               ABC                   QPR
123                      01-20-2008               QPR                   LMN

Thank you
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros