SQL Language (MOSC)

MOSC Banner

N:M data query where data is in a single table

edited Jan 29, 2016 2:38PM in SQL Language (MOSC) 5 comments

I have a table with data for accounts and customers such that they form a N:M relationship.  I wanted to query the table such that I get the N:1 data first followed by 1:M data grouped by as below (below the last customer involved in N:1 is same as first record in next set 1:M data).  There are around 80k data in that table currently random and some repetitions and some not involved either in N:1 or 1:M.  I am able to query independently N:1 and 1:M but not able to order them together as below (below the last customer

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center