That's called Pivoting. Since I don't have a test copy of your table, I'll use scott.emp to illustrate.
This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:
WITH relevant_data AS
SELECT ename, job, hiredate
, row_number () OVER ( PARTITION BY job
ORDER BY hiredate
) AS r_num
PIVOT ( MIN (ename) AS ename
, MIN (hiredate) AS hiredate
FOR r_num IN (1, 2, 3)
ORDER BY job
JOB 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE
--------- ---------- ----------- ---------- ----------- ---------- -----------
ANALYST FORD 03-Dec-1981 SCOTT 19-Apr-1987
CLERK SMITH 17-Dec-1980 JAMES 03-Dec-1981 MILLER 23-Jan-1982
MANAGER JONES 02-Apr-1981 BLAKE 01-May-1981 CLARK 09-Jun-1981
PRESIDENT KING 17-Nov-1981
SALESMAN ALLEN 20-Feb-1981 WARD 22-Feb-1981 TURNER 08-Sep-1981
There are actually more than 3 CLERKS and SALESMEN. That doesn't cause an error; only the 3 earliest ones are shown.
As you can see, having fewer than 3 doesn't cause any errors, either.
For more about pivots, see the Forum FAQ:
I hope this answers your question.
If not, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
If yod rather post a problem using scott.emp, then you don't need to post any sample data; just the results and explanation.
Always say which version of Oracle you're using (e.g., 220.127.116.11.0).
See the forum FAQ: