Returning unique �cate_id's, as a string separated by the comma(,) in ascending order for each group of 'pub_id' from the book_mast table:
Publisher id
GROUP_CONCAT(DISTINCT cate_id)
P003
CA001,CA003
P005
CA001,CA004
P006
CA001,CA005
P001
CA002,CA004
P004
CA002,CA005
P007
CA002,CA005
P002
CA003
P008
CA004,CA005