This may be out there somewhere, but not quite sure how to ask it. Hopefully it will be a quick one. Say I have a table like the following:
name count site
Guy Man 2 ABC
Guy Man 3 BCD
Guy Man 4 CDE
Girl Woman 2 ABC
Girl Woman 2 BCD
Girl Woman 3 CDE
I would like to annotate these, so that I get a name, total count, and list of sites. So given the data above, I'd get the following.
[
{
"name": "Guy Man",
"count_total": 9,
"site_list": "ABC, BCD, CDE"
},
{
"name": "Girl Woman",
"count_total": 7,
"site_list": "ABC, BCD, CDE"
}
]
I understand how to get count_total
, but I'm not sure how to get site_list
. Any ideas?