---
title: "Discussion on \"Aggregate Functions Trong Postgres\" | Hashnode"
description: "Discussion on \"Aggregate Functions Trong Postgres\". 1.String_agg\nID   COMPANY_ID   EMPLOYEE\n1    1            Anna\n2    1            Bill\n3    2            Carol\n4    2            Dave\nSELECT company_id, string_agg(employee, ', ')\nFROM mytable\nGROUP BY company_id;\nCOMPANY_ID   EMPLOYEE\n1            An..."
url: "https://hashnode.com/posts/aggregate-functions-trong-postgres-1/60e91276c551f16b0f846f79"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Aggregate Functions Trong Postgres](https://thanhbn.hashnode.dev/aggregate-functions-trong-postgres-1?utm_source=hashnode&utm_medium=feed)

1.String\_agg ID COMPANY\_ID EMPLOYEE 1 1 Anna 2 1 Bill 3 2 Carol 4 2 Dave SELECT company\_id, string\_agg(employee, ', ') FROM mytable GROUP BY company\_id; COMPANY\_ID EMPLOYEE 1 An...

Jul 10, 2021 · 1 min read · thanhbn.hashnode.dev  
Read the article

## Written by

[Thành Bùi](https://hashnode.com/@thanhbn99)

@thanhbn99

  
[View profile](https://hashnode.com/@thanhbn99)

Clean

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
