Data Analyst and Team Lead
Data Analyst and Team Lead Interview Questions and Answers
Q1. 1. Types of joins : i) Scenario of 2 tables and output rows of those cases
Types of joins in SQL include inner join, left join, right join, and full outer join.
Inner join: Returns rows when there is a match in both tables.
Left join: Returns all rows from the left table and the matched rows from the right table.
Right join: Returns all rows from the right table and the matched rows from the left table.
Full outer join: Returns rows when there is a match in either table.
Example: Inner join - SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.i...read more
Q2. 2. How to delete duplicate rows in SQL
Use the DELETE statement with a self-join to remove duplicate rows in SQL.
Use a self-join to identify duplicate rows based on a unique identifier column
Use the DELETE statement with the self-join condition to remove the duplicates
Example: DELETE FROM table_name WHERE id NOT IN (SELECT MIN(id) FROM table_name GROUP BY column1, column2)
Q3. 3. Window functions difference?
Window functions are used to perform calculations across a set of table rows related to the current row.
Window functions operate on a set of rows related to the current row
They can be used to calculate running totals, moving averages, rank, etc.
Examples include ROW_NUMBER(), RANK(), LAG(), LEAD()
Data Analyst and Team Lead Jobs
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month