I tried to return the queryset with one field which is the list string in django, for example, like this:
Name:
Chicken Wing
Ids:
2529,2695,10829,10995,12129,12295
I only know how to get the queryset by GROUP_CONCAT
which support MySQL database, when I migrated to SQL Server 2017 database. It doesn't work, I checked SQL Server 2017 support STRING_AGG
, but I don't know how to use it in django. (I am using django rest framework).
Can anyone can help me?