I will like to create a view in DB2 with group by function. Not sure whether SQL statement able to create such view.
Data:
TableId department item
1 dept1 item1
2 dept2 item1
3 dept1 item1
4 dept2 item1
View output:
department item id
dept1 item1 1,3
dept2 item1 2,4
I able to create a view to group by department and item, but unsure on how to combine the table in the view.
Seek for advise.
Many Thanks in advance.