Round 1
Questions:
-
SQL: Write SQL code to show the previous sale and next sale for each date?
| date | sales_amount | |-------------|--------------| | 10-10-2022 | 2500 | | 18-10-2022 | 1600 | | 12-10-2022 | 1200 | | 13-10-2022 | 1500 | | 14-10-2022 | 700 | | 20-10-2022 | 2400 | | 11-10-2022 | 1000 | | 16-10-2022 | 2000 | | 17-10-2022 | 1900 | | 15-10-2022 | 900 | | 19-10-2022 | 3200 |
- What are the optimization techniques you have used before?
- What are the differences between CTEs and Temp tables?
Specific question not provided.
Candidate's Approach
The candidate was able to explain the logic of the query but struggled to write the correct SQL code. They felt rushed by the interviewer, who indicated there were only 2 minutes left to conclude the discussion.
Interviewer's Feedback
The candidate sensed that the hiring manager was uninterested and felt that they were not a good fit for the team. The interview ended 15 minutes early, and the candidate did not ask any questions due to the perceived lack of interest from the interviewers.