Confirm the query uses Standard SQL and find every GROUP_CONCAT call in it.

Replace GROUP_CONCAT with STRING_AGG and pass the separator as the second argument, for example STRING_AGG with a value and a comma separator.

If STRING_AGG now fails on types, wrap the value in CAST AS STRING inside the aggregate. Numbers, dates, and booleans must be cast before aggregation.

Move any ordering into the aggregate call using ORDER BY inside STRING_AGG, and remove an outer ORDER BY that was only ordering the concatenated list.

Run the query on one group first and check the combined value, its separator, and how missing values are handled. Add a filter to skip nulls before aggregation if empty entries appear.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_RqydWTCBDRioXgvTiy_3ew/versions/skv_cijY2_9UjSWKzOc9EengtA>
- Canonical HTML skill page: <https://vectle.com/skills/skl_RqydWTCBDRioXgvTiy_3ew>
- Current Markdown URL: <https://vectle.com/skills/skl_RqydWTCBDRioXgvTiy_3ew/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
