troubleshooting Question

Last Function in Group By Query in Oracle

Avatar of Farzad Akbarnejad
Farzad AkbarnejadFlag for Iran, Islamic Republic of asked on
Oracle DatabaseSQL
3 Comments1 Solution382 ViewsLast Modified:
Hello,

I have a table with the following data:


            RWSHID            RISUID       JOBCODE
  ---------------------------------------------------------
      0188280314      0010202751      000000
      0188280314      0010202751      024019
      0188280314      0010202751      024043
      0188280314      0010424521      000000
      0188280314      0010424521      024043
      0188280314      0010424521      027212
      0188280314      0010454707      007005
      0188280314      0010454707      024019
      0188280314      0010454707      024043
      0188280314      0010661047      024043
      0188280314      0010661047      027075
      0188280314      0010667463      024019
      0188280314      0010667463      024032
      0188280314      0010667463      024043
      0188280314      0010684834      000000
      0188280314      0010684834      001094
            ...........           ...............       ...........
            ...........           ...............       ...........
            ...........           ...............       ...........
            ...........           ...............       ...........

I want to distinct (or group by) on RWSHID and RISUID and select last JOBCODE in each row.
Would you please send me the query run in Oracle (PL/SQL)

Thanks
-FA


ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
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