Я использую Oracle 11g и SQL Developer 16.260.
ТАБЛИЦА 1 - СОТРУДНИК
ID FIRST_NAME LAST_NAME
1 CHRIS PETERS
2 MICHELLE ANDREWS
3 ANDY JONES
ТАБЛИЦА 2 - НАВЫКИ
ID SKILL
1 WRITING
2 READING
3 COMPUTERS
4 EXCEL
5 TYPING
6 MS WORD
ТАБЛИЦА 3 - EMPLOYEE_SKILLS
ID EMPLOYEE_ID SKILLS_ID
1 1 1
2 1 2
3 1 4
4 2 1
5 2 2
6 2 3
7 2 6
8 3 1
9 3 6
10 3 5
Я ищузапрос, который даст мне следующие результаты
EMPLOYEE.FIRST_NAME EMPLOYEE.LAST_NAME SKILL COMPLETE
CHRIS PETERS WRITING Complete
CHRIS PETERS READING Complete
CHRIS PETERS COMPUTERS Incomplete
CHRIS PETERS EXCEL Complete
CHRIS PETERS TYPING Incomplete
CHRIS PETERS MS WORD Incomplete
MICHELLE ANDREWS WRITING Complete
MICHELLE ANDREWS READING Complete
MICHELLE ANDREWS COMPUTERS Complete
MICHELLE ANDREWS EXCEL Incomplete
MICHELLE ANDREWS TYPING Incomplete
MICHELLE ANDREWS MS WORD Complete
ANDY JONES WRITING Complete
ANDY JONES READING Incomplete
ANDY JONES COMPUTERS Incomplete
ANDY JONES EXCEL Incomplete
ANDY JONES TYPING Complete
ANDY JONES MS WORD Complete
Я пробовал и другие варианты
SELECT E.FIRST_NAME, E.LAST_NAME, S.SKILL, CASE ES.SKILLS_ID IS NULL THEN 'Incomplete' ELSE 'COMPLETE' END
FROM EMPLOYEE E, EMPLOYEE_SKILLS ES
LEFT JOIN SKILLS S ON S.ID = ES.SKILLS_ID
WHERE EMPLOYEE.ID=EMPLOYEE_SKILLS.EMPLOYEE_ID
Я не могу повторить НАВЫКИ для каждого сотрудника.