Obtaining a list of audience names and descriptions via Query Studio
I would like to run a query in Query Studio which produces a list of audiences with the following details: id, description, name, profile count.
I am wondering how to expand the following query to get not only ids and profile counts but also names and descriptions:
SELECT
CONCAT_WS('-', key, source_namespace) AS audience_id,
COUNT(1) AS count_of_profiles
FROM
(
SELECT
UPPER(key) AS source_namespace,
EXPLODE(value)
FROM
(
SELECT
EXPLODE(segmentMembership)
FROM
<correct_dataset_name>
)
)
GROUP BY
audience_id;