I want to join table A and B with B.c being a column that returns multiple strings as list. When I do an inner join with
select A.x, B.c
from A
join B
on A.y=B.y
I get an output with [number of values in list] rows per observation. Is there a way to write the list into a single field in the result table so I get a single row per observation?
UPDATE:
select profiles.name, profiles.street_no, profiles.street_name, profiles.postal_code, profiles.city, profiles.country_code, profiles.owner, profiles_emails.email, profiles_telephones.telephone, clusters.main_topic, group_concat(profiles_tags.tag)
from profiles
join profiles_emails
on profiles.id=profiles_emails.profiles_id
join profiles_telephones
on profiles.id=profiles_telephones.profiles_id
join profiles_tags
on profiles.id=profiles_tags.profiles_id
join profiles_clusters
on profiles_clusters.profiles_id=profiles.id
join clusters
on profiles_clusters.clusters_id=clusters.id
group by profiles.city, profiles.name, profiles.street_no, profiles.street_name, profiles.postal_code, profiles.country_code, profiles.owner, profiles_emails.email, profiles_telephones.telephone, clusters.main_topic
The group by of course takes way too much time and the desired output is simply a table with all the selected columns and the last column as list.