---
title: "Zip \uC9D1\uACC4 \uD568\uC218"
description: "\uC5EC\uB7EC \uBB38\uC11C\uC758 \uBC14\uC774\uB108\uB9AC\uB97C \uD558\uB098\uC758 ZIP \uC544\uCE74\uC774\uBE0C\uB85C \uACB0\uD569\uD558\uB294 \uADF8\uB8F9 \uD568\uC218\uC785\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/docs/invantive-universalsql/grammar/aggregate-functions/zip-aggregate-function
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/aggregate-functions/zip-aggregate-function
updated: 2026-12-04T12:50:15Z
license: https://documentation.invantive.eu/ko/
---

## 구문
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    zipAggregateFunction_start((START))
    zipAggregateFunction_start --> zipAggregateFunction_0_0[ZIP]:::quoted
    zipAggregateFunction_0_0 --> zipAggregateFunction_0_1["("]:::quoted
    zipAggregateFunction_0_1 --> zipAggregateFunction_0_2[expressionList]
    zipAggregateFunction_0_2 --> zipAggregateFunction_0_3[")"]:::quoted
    zipAggregateFunction_0_3 --> zipAggregateFunction_end((END))
```

## 목적
여러 문서의 바이너리를 하나의 ZIP 아카이브로 결합하는 그룹 함수입니다. 첫 번째 식은 각 문서의 바이너리 내용(`blob`)을 제공하고, 두 번째 식은 아카이브 내 문서의 파일 이름을 제공합니다. `null` 내용은 건너뛰며, `null` 내용만 존재하는 경우 결과는 `null`입니다.

반환값: `blob`로서의 ZIP 아카이브입니다.

## 예시
다음 예제는 모든 고객의 송장 PDF 문서를 하나의 ZIP 아카이브로 결합합니다. 예를 들어 감사인에게 전달하기 위한 것이며, 결과는 송장마다 파일을 포함하는 하나의 `blob`입니다:
```sql
select zip(ivc.pdf_document, ivc.invoice_number || '.pdf') invoices_archive
from   invoices ivc
```
다음 예제는 고객별 송장 PDF 문서를 고객마다 하나의 ZIP 아카이브로 결합합니다. 예를 들어 각 고객에게 미결 송장 사본을 보내기 위한 것이며, 각 아카이브를 고객 이름으로 명명합니다:
```sql
select ivc.customer_name
,      zip(ivc.pdf_document, ivc.invoice_number || '.pdf') invoices_archive
from   invoices ivc
group
by     ivc.customer_name
```

