# SQL Joins 및 고급 쿼리 (Data Science & ML) > INNER JOIN, LEFT/RIGHT JOIN, CROSS JOIN, CTE, window functions, 중첩 쿼리, 최적화 - 22 면접 질문 - Mid-Level - [면접 질문: Data Science & ML](https://sharpskill.dev/ko/technologies/data-science/interview-questions.md) ## 1. 두 테이블 모두에서 일치하는 행만 반환하는 JOIN 유형은 무엇입니까? **답변** INNER JOIN은 두 테이블 모두에서 일치하는 행만 반환합니다. 왼쪽 테이블의 행이 오른쪽 테이블에서 일치하지 않으면(또는 그 반대인 경우), 결과에서 제외됩니다. 이는 가장 제한적이며 관련 데이터를 결합하는 데 가장 일반적으로 사용되는 JOIN 유형입니다. ## 2. 오른쪽 테이블에 일치하는 항목이 없을 때 LEFT JOIN의 결과는 무엇입니까? **답변** LEFT JOIN은 오른쪽 테이블에 일치하는 항목이 없더라도 왼쪽 테이블의 모든 행을 유지합니다. 이 경우 오른쪽 테이블의 열은 NULL 값으로 채워집니다. 이를 통해 메인 테이블 데이터의 무결성을 보존하면서 선택적 정보를 추가할 수 있습니다. ## 3. JOIN을 사용하여 주문하지 않은 고객을 어떻게 찾을 수 있습니까? **답변** 일치하지 않는 레코드를 찾으려면 LEFT JOIN 다음에 오른쪽 테이블의 열에 대한 WHERE 필터 IS NULL을 사용합니다. 이 기법은 주문 테이블을 여러 번 스캔하지 않기 때문에 NOT IN 서브쿼리보다 성능이 우수합니다. 이는 고아 데이터를 감지하기 위한 고전적인 패턴입니다. ## 19개 추가 질문 이용 가능 - CROSS JOIN은 결과로 무엇을 생성합니까? - SELF JOIN이란 무엇이며 언제 사용합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Data Science & ML 면접 주제 - [Python 기초](https://sharpskill.dev/ko/technologies/data-science/interview-questions/python-basics.md): 25개 질문, Junior - [Python 객체 지향 프로그래밍](https://sharpskill.dev/ko/technologies/data-science/interview-questions/python-oop.md): 20개 질문, Junior - [Python 데이터 구조](https://sharpskill.dev/ko/technologies/data-science/interview-questions/python-data-structures.md): 20개 질문, Junior - [Git 기초](https://sharpskill.dev/ko/technologies/data-science/interview-questions/git-fundamentals.md): 18개 질문, Junior - [SQL 기초](https://sharpskill.dev/ko/technologies/data-science/interview-questions/sql-basics.md): 20개 질문, Junior - [NumPy 기초](https://sharpskill.dev/ko/technologies/data-science/interview-questions/numpy-fundamentals.md): 22개 질문, Junior - [Pandas 기초](https://sharpskill.dev/ko/technologies/data-science/interview-questions/pandas-basics.md): 22개 질문, Junior - [Jupyter & Google Colab](https://sharpskill.dev/ko/technologies/data-science/interview-questions/jupyter-colab.md): 16개 질문, Junior - [Pandas 고급](https://sharpskill.dev/ko/technologies/data-science/interview-questions/pandas-advanced.md): 24개 질문, Mid-Level - [Matplotlib & Seaborn을 활용한 시각화](https://sharpskill.dev/ko/technologies/data-science/interview-questions/matplotlib-seaborn.md): 20개 질문, Mid-Level - [Plotly로 만드는 인터랙티브 시각화](https://sharpskill.dev/ko/technologies/data-science/interview-questions/plotly-interactive.md): 18개 질문, Mid-Level - [기술 통계](https://sharpskill.dev/ko/technologies/data-science/interview-questions/statistics-descriptive.md): 20개 질문, Mid-Level - [추론 통계학](https://sharpskill.dev/ko/technologies/data-science/interview-questions/statistics-inferential.md): 24개 질문, Mid-Level - [Web Scraping](https://sharpskill.dev/ko/technologies/data-science/interview-questions/web-scraping.md): 18개 질문, Mid-Level - [BigQuery & Cloud Data](https://sharpskill.dev/ko/technologies/data-science/interview-questions/bigquery-cloud.md): 18개 질문, Mid-Level - [Feature Engineering](https://sharpskill.dev/ko/technologies/data-science/interview-questions/feature-engineering.md): 22개 질문, Mid-Level - [지도 머신러닝: 회귀](https://sharpskill.dev/ko/technologies/data-science/interview-questions/ml-supervised-regression.md): 24개 질문, Mid-Level - [지도 머신러닝: 분류](https://sharpskill.dev/ko/technologies/data-science/interview-questions/ml-supervised-classification.md): 24개 질문, Mid-Level - [결정 트리 및 앙상블](https://sharpskill.dev/ko/technologies/data-science/interview-questions/ml-trees-ensembles.md): 24개 질문, Mid-Level - [비지도 ML](https://sharpskill.dev/ko/technologies/data-science/interview-questions/ml-unsupervised.md): 22개 질문, Mid-Level - [ML 파이프라인 및 검증](https://sharpskill.dev/ko/technologies/data-science/interview-questions/ml-pipelines-validation.md): 22개 질문, Mid-Level - [시계열 및 예측](https://sharpskill.dev/ko/technologies/data-science/interview-questions/time-series-forecasting.md): 22개 질문, Mid-Level - [Deep Learning 기초](https://sharpskill.dev/ko/technologies/data-science/interview-questions/deep-learning-fundamentals.md): 24개 질문, Senior - [TensorFlow & Keras](https://sharpskill.dev/ko/technologies/data-science/interview-questions/tensorflow-keras.md): 22개 질문, Senior - [CNN 및 이미지 분류](https://sharpskill.dev/ko/technologies/data-science/interview-questions/cnn-image-classification.md): 24개 질문, Senior - [RNN 및 시퀀스](https://sharpskill.dev/ko/technologies/data-science/interview-questions/rnn-sequences.md): 22개 질문, Senior - [Transformers 및 Attention](https://sharpskill.dev/ko/technologies/data-science/interview-questions/transformers-attention.md): 24개 질문, Senior - [NLP 및 Hugging Face](https://sharpskill.dev/ko/technologies/data-science/interview-questions/nlp-huggingface.md): 24개 질문, Senior - [GenAI 및 LangChain](https://sharpskill.dev/ko/technologies/data-science/interview-questions/genai-langchain.md): 24개 질문, Senior - [MLOps 및 배포](https://sharpskill.dev/ko/technologies/data-science/interview-questions/mlops-deployment.md): 24개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/data-science/interview-questions/sql-joins-advanced