How do I list a column of all rows in a group afte...
# ask-stanley-ai
a
How do I list a column of all rows in a group after doing a GROUP BY in suiteql
c
AI generated answer (using internal Slack threads):
In SuiteQL, there is no direct way to list all rows in a group after doing a GROUP BY. The function you're looking for, similar to LISTAGG in SQL, is not supported in SuiteQL. Here is the query you tried:
Copy code
sql
SELECT type, 
LISTAGG(custbody_transaction_type, ',') WITHIN GROUP (ORDER BY custbody_transaction_type) AS trans_types
FROM transaction tx
WHERE custbody_policy_number = 4000
AND type IN ('SalesOrd', 'RtnAuth')
GROUP BY type
Unfortunately, the LISTAGG function is not supported in SuiteQL. You can refer to the list of supported functions in SuiteQL here: [SuiteQL Supported Functions](http://app.netsuite.com/app/help/helpcenter.nl?fid=section_158513731864.html) As an alternative, you might need to output the detail rows and summarize in script logic, or use a different tool other than SuiteQL to achieve this. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808013
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803535163
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.774768174
Please provide your feedback on this answer.