Select id, string_agg (distinct (name), "/")
The from student
Group by class
CodePudding user response:
Select id, string_agg (name, "/")The from (
The select distintct XXXX
The from student
Group by class
) data
CodePudding user response:
Select id, array_to_string (the array_agg (distinct name), '/')The from student
Group by class