# Data Engineering을 위한 고급 SQL (Data Engineering) > Window 함수, 재귀 CTE, 분석 쿼리, 최적화, EXPLAIN ANALYZE, 인덱싱, 파티셔닝 - 20 면접 질문 - Mid-Level - [면접 질문: Data Engineering](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions.md) ## 1. 파티션 내 각 행에 고유한 순차 번호를 할당하는 window 함수는 무엇입니까? **답변** ROW_NUMBER()는 파티션 내 각 행에 1부터 시작하는 고유한 순차 번호를 할당합니다. 동일한 값에 같은 번호를 할당할 수 있는 RANK()와 DENSE_RANK()와 달리, ROW_NUMBER()는 ORDER BY 절에서 값이 동일하더라도 항상 고유한 번호를 보장합니다. ## 2. RANK()와 DENSE_RANK()의 주요 차이점은 무엇입니까? **답변** RANK()는 동점 값 이후의 번호 매기기에 간격을 남깁니다. 예를 들어, 두 행이 1위로 매겨지면 다음 행은 3위가 됩니다. DENSE_RANK()는 간격을 남기지 않습니다: 두 행이 1위로 매겨진 후 다음 행은 2위가 됩니다. 이 구분은 간격이 통계를 왜곡할 수 있는 순위 분석에서 중요합니다. ## 3. window 함수로 누적 합계(running total)를 계산하는 방법은? **답변** 명시적인 프레임 없이 ORDER BY를 사용하는 SUM() OVER는 기본적으로 ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW를 사용하여 현재 행을 포함한 모든 이전 행의 합계를 계산합니다. 이는 시계열 또는 순차 분석에서 누적 합계를 생성하는 표준 동작입니다. ## 17개 추가 질문 이용 가능 - window 함수에서 PARTITION BY 절의 역할은 무엇입니까? - window 함수에서 이전 행의 값에 접근할 수 있는 함수는 무엇입니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Data Engineering 면접 주제 - [Linux & Shell - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/linux-shell-basics.md): 20개 질문, Junior - [Git & GitHub - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/git-github-fundamentals.md): 20개 질문, Junior - [데이터 엔지니어링을 위한 고급 Python](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/python-advanced-de.md): 25개 질문, Junior - [Docker - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/docker-fundamentals.md): 25개 질문, Junior - [Google Cloud Platform - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/gcp-fundamentals.md): 20개 질문, Junior - [CI/CD 및 코드 품질](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/ci-cd-code-quality.md): 20개 질문, Mid-Level - [Docker Compose](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/docker-compose.md): 20개 질문, Mid-Level - [FastAPI - 데이터 API](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/fastapi.md): 20개 질문, Mid-Level - [Data Lake - 아키텍처 및 수집](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/data-lake.md): 20개 질문, Mid-Level - [데이터 엔지니어링을 위한 BigQuery](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/bigquery-de.md): 20개 질문, Mid-Level - [PostgreSQL - 관리](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/postgresql-admin.md): 20개 질문, Mid-Level - [Data Engineering을 위한 Data Modeling](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/data-modeling-de.md): 20개 질문, Mid-Level - [Fivetran & Airbyte - 데이터 수집](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/fivetran-airbyte.md): 20개 질문, Mid-Level - [dbt - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/dbt-fundamentals-de.md): 20개 질문, Mid-Level - [Apache Airflow - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/airflow-fundamentals.md): 20개 질문, Mid-Level - [Kubernetes - 기초](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/kubernetes-fundamentals.md): 20개 질문, Mid-Level - [dbt - 고급 기능](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/dbt-advanced-de.md): 20개 질문, Senior - [ETL / ELT / ETLT 패턴](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/etl-elt-patterns.md): 20개 질문, Senior - [Apache Airflow - 고급](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/airflow-advanced.md): 20개 질문, Senior - [Airflow + dbt - 파이프라인 오케스트레이션](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/airflow-dbt-integration.md): 20개 질문, Senior - [PySpark - 대규모 처리](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/pyspark.md): 20개 질문, Senior - [Google Pub/Sub - 데이터 스트리밍](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/pubsub-streaming.md): 20개 질문, Senior - [Apache Beam & Dataflow](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/apache-beam-dataflow.md): 20개 질문, Senior - [Kubernetes - 프로덕션 및 스케일링](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/kubernetes-advanced.md): 20개 질문, Senior - [Terraform - Infrastructure as Code](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/terraform.md): 20개 질문, Senior - [NoSQL 데이터베이스](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/nosql-databases.md): 20개 질문, Senior - [모던 Data Architecture](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/data-architecture.md): 20개 질문, Senior - [모니터링 및 관찰 가능성](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/monitoring-observability.md): 20개 질문, Senior - [IAM 및 데이터 보안](https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/iam-security-de.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/data-engineering/interview-questions/sql-advanced-de