I have the following tables:
Employee:
Id | NAME | Qualification | Experience(yrs) |
---|---|---|---|
1 | Aaron | Eng | 2 |
2 | Jacob | CS | 3 |
3 | Jehan | Art | 1 |
4 | Jenny | Math | 7 |
Task:
Task_Name | Emp_id | duration(mins) | Wage |
---|---|---|---|
clean | 1,3 | 200 | 50 |
wash | 4 | 300 | 200 |
decor | 1,2,4 | 250 | 300 |
errands | 2,4 | 150 | 150 |
I would like to write an oracle query which returns the following output:
Task_responsbility:
Task_Name | Employee | duration(mins) | Wage |
---|---|---|---|
clean | Aaron,Jehan | 200 | 50 |
wash | Jenny | 300 | 200 |
decor | Aaron,Jacob,Jenny | 250 | 300 |
errands | Jacob,Jenny | 150 | 150 |
I need the Emp_ids
to be replaced by employee_names
Can someone please let me know how to go about this ?