0% found this document useful (0 votes)
2 views

SQL Interview Notes for Data Analyst

The document outlines essential SQL commands and concepts for data analysts, including important commands like SELECT, JOIN types, aggregate functions, subqueries, and window functions. It also lists common SQL interview questions and provides tips for practicing SQL skills. Key topics include understanding query structure, performance basics, and testing queries on sample datasets.

Uploaded by

Himanshu Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

SQL Interview Notes for Data Analyst

The document outlines essential SQL commands and concepts for data analysts, including important commands like SELECT, JOIN types, aggregate functions, subqueries, and window functions. It also lists common SQL interview questions and provides tips for practicing SQL skills. Key topics include understanding query structure, performance basics, and testing queries on sample datasets.

Uploaded by

Himanshu Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Interview Notes for Data Analyst

1. Important SQL Commands:

- SELECT, FROM, WHERE

- GROUP BY, HAVING, ORDER BY

- DISTINCT, LIMIT, ALIAS (AS)

2. JOINS (with examples):

- INNER JOIN: returns matching rows

- LEFT JOIN: all from left + matched from right

- RIGHT JOIN, FULL OUTER JOIN

3. Aggregate Functions:

- COUNT(), SUM(), AVG(), MIN(), MAX()

- GROUP BY with aggregates

4. Subqueries & Nested Queries:

- SELECT inside SELECT

- WHERE IN (SELECT ...)

- Correlated Subqueries

5. Window Functions:

- ROW_NUMBER(), RANK(), DENSE_RANK()

- OVER(PARTITION BY ... ORDER BY ...)

6. SQL Interview Questions:

- How do you find top 5 customers by revenue?


- Difference between WHERE and HAVING?

- What is a window function? Give an example.

- How to find duplicate rows in a table?

Tips:

- Always test queries on sample datasets.

- Understand indexing and performance basics.

- Practice real-world SQL questions.

You might also like