Sr Data Analyst Interview Questions

2,948 sr data analyst interview questions shared by candidates

The interview was rescheduled 2 times just before the scheduled time. The interviewer asked 2 SQL questions.  The 1st question, I solved by self-join but I explained to him, that we could solve it by lag and lead, and then he asked to me write code for lag and lead. I have written the same. Then for 2nd question, He asked me, if there were 2 tables, one table had detailed data ( very heavy ) and 2nd table had only some details.  He said we can't run a query on Table 1 because it's too heavy.  I have answered for both tables.  He said give me more way, I said, I am not aware of it, could you please let me know. Then he suggested we join both tables and give aggregate conditions during the join and where clause.  I was not sure, as per my experience we can't give aggregate conditions during the join and where clause, so I have written dry run code to validate the answer.  select *from table_1 as t1left join table_2 as t2on t1.c1 > max(t2.c2) select *from table_1 as t1left join table_2 as t2on t1.c1 = t2.c2where t1.c1 > max(c2) At last, I said, as per my information these are against SQL fundamentals, I might have less experience but i am confident on my answer.  Then the Interview was completed, HR was also in call during the interview. I forgot to ask 1 question, when you are saying we can't run a query on table_1 then why are we joining both table?  Thanks. 
avatar

Senior Data Analyst

Interviewed at Cyncly

4
Nov 9, 2023

The interview was rescheduled 2 times just before the scheduled time. The interviewer asked 2 SQL questions.  The 1st question, I solved by self-join but I explained to him, that we could solve it by lag and lead, and then he asked to me write code for lag and lead. I have written the same. Then for 2nd question, He asked me, if there were 2 tables, one table had detailed data ( very heavy ) and 2nd table had only some details.  He said we can't run a query on Table 1 because it's too heavy.  I have answered for both tables.  He said give me more way, I said, I am not aware of it, could you please let me know. Then he suggested we join both tables and give aggregate conditions during the join and where clause.  I was not sure, as per my experience we can't give aggregate conditions during the join and where clause, so I have written dry run code to validate the answer.  select *from table_1 as t1left join table_2 as t2on t1.c1 > max(t2.c2) select *from table_1 as t1left join table_2 as t2on t1.c1 = t2.c2where t1.c1 > max(c2) At last, I said, as per my information these are against SQL fundamentals, I might have less experience but i am confident on my answer.  Then the Interview was completed, HR was also in call during the interview. I forgot to ask 1 question, when you are saying we can't run a query on table_1 then why are we joining both table?  Thanks. 

Viewing 2851 - 2860 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 2,948 interview questions and reports from Sr data analyst interviews. Prepare for your interview. Get hired. Love your job.