0% found this document useful (0 votes)
4 views3 pages

Top 100 SQL Data Analyst Questions

The document lists the top 100 SQL interview questions specifically tailored for data analysts, categorized by topics such as SELECT, JOIN, Subquery, Window functions, CTE, and Analytics. Each question is indexed and focuses on various SQL concepts and operations relevant to data analysis. This resource serves as a comprehensive guide for preparing for SQL interviews in the data analytics field.

Uploaded by

ds9991841
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)
4 views3 pages

Top 100 SQL Data Analyst Questions

The document lists the top 100 SQL interview questions specifically tailored for data analysts, categorized by topics such as SELECT, JOIN, Subquery, Window functions, CTE, and Analytics. Each question is indexed and focuses on various SQL concepts and operations relevant to data analysis. This resource serves as a comprehensive guide for preparing for SQL interviews in the data analytics field.

Uploaded by

ds9991841
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

Top 100 SQL Interview Questions for Data Analyst

Index Question Topic

1 Find all employees data SELECT

2 Find unique department names DISTINCT

3 Find employees with salary > 50000 WHERE

4 Find employees in IT department WHERE

5 Find employees hired after 2022 WHERE

6 Sort employees by salary ORDER BY

7 Top 5 highest salaries LIMIT

8 Find employees with NULL manager NULL

9 Count total employees COUNT

10 Find average salary AVG

11 Total salary of employees SUM

12 Highest salary MAX

13 Lowest salary MIN

14 Department wise salary GROUP BY

15 Department wise employee count GROUP BY

16 Departments with more than 5 employees HAVING

17 Average salary per department GROUP BY

18 Total orders per customer GROUP BY

19 Revenue per product GROUP BY

20 Monthly sales report GROUP BY

21 Employees with department names INNER JOIN

22 Customers without orders LEFT JOIN

23 Orders without customers RIGHT JOIN

24 Full join example FULL JOIN

25 Self join employees manager SELF JOIN

26 Students and exams JOIN

27 Products never sold LEFT JOIN

28 Visits without transactions LEFT JOIN

29 Customers with multiple orders JOIN

30 Employee department count JOIN

31 Highest salary per department JOIN

32 Department without employees JOIN


Index Question Topic

33 Employee manager salary comparison SELF JOIN

34 Customers with last order date JOIN

35 Products with highest revenue JOIN

36 Top customer by spending JOIN

37 Orders with product names JOIN

38 Employee project mapping JOIN

39 Students missing subjects CROSS JOIN

40 Customer first purchase JOIN

41 Employees above average salary Subquery

42 Second highest salary Subquery

43 Nth highest salary Subquery

44 Department highest salary Subquery

45 Customers with max orders Subquery

46 Products above avg price Subquery

47 Employees same salary Subquery

48 Customers who bought expensive product Subquery

49 Latest order Subquery

50 Max order per customer Subquery

51 Employees without bonus Subquery

52 Salary greater than manager Subquery

53 Products never ordered Subquery

54 Duplicate emails Subquery

55 Remove duplicates Subquery

56 ROW_NUMBER example Window

57 RANK example Window

58 DENSE_RANK example Window

59 Top 3 salary per department Window

60 Running total Window

61 Moving average Window

62 Previous row value LAG

63 Next row value LEAD

64 Salary difference LAG

65 First order per customer Window

66 Last order per customer Window


Index Question Topic

67 Consecutive login days Window

68 Highest sale per month Window

69 Percent rank Window

70 Cumulative revenue Window

71 Salary category CASE

72 Order status CASE

73 Grade classification CASE

74 Revenue category CASE

75 Age category CASE

76 CTE basic example CTE

77 CTE second highest salary CTE

78 Recursive CTE CTE

79 Employee hierarchy CTE

80 Running totals with CTE CTE

81 Duplicate removal CTE

82 Top products CTE

83 Customer retention CTE

84 Sales growth CTE

85 Monthly comparison CTE

86 Daily active users Analytics

87 Monthly active users Analytics

88 Customer retention rate Analytics

89 Churn rate Analytics

90 Repeat customers Analytics

91 Revenue growth Analytics

92 Funnel analysis Analytics

93 Cohort analysis Analytics

94 Top selling product Analytics

95 Least selling product Analytics

96 Revenue by region Analytics

97 First purchase date Analytics

98 Last purchase date Analytics

99 Customer lifetime value Analytics

100 Sales trend analysis Analytics

You might also like