GitHub user combineads opened a pull request:
https://github.com/apache/tajo/pull/1029
TAJO-2160: Implement string_agg function.
I'll implement to concatenate the strings of a field within a group by
query.
I have a table:
ID COMPANY_ID EMPLOYEE
1 1 Anna
2 1 Bill
3 2 Carol
4 2 Dave
and I wanted to group by company_id to get something like:
SELECT company_id, string_agg(employee, ', ')
FROM mytable
GROUP BY company_id;
COMPANY_ID EMPLOYEE
1 Anna, Bill
2 Carol, Dave
PostgreSQL supports string_agg function.
http://www.postgresql.org/docs/current/static/functions-aggregate.html#FUNCTIONS-AGGREGATE-
TABLE
Thank you.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/combineads/tajo TAJO-2160
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/1029.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1029
----
commit 6bda513bb7c270c252986dfd43ee80f5b59d8eea
Author: Byunghwa Yun <[email protected]>
Date: 2016-05-20T09:43:40Z
TAJO-2160: Implement string_agg function.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---