Top 15 SQL Interview Questions
Top 15 SQL Interview Questions
Questions
(Big 4 Companies)
- Ananya Laha
Here are the Top 15 SQL Interview Questions (Big 4 Edition) with sample
answers- formatted clearly so you can save and revise:
15. Get the latest record for each employee from audit table.
SELECT *
FROM (
SELECT *, ROW_NUMBER() OVER (PARTITION BY emp_id ORDER BY
updated_at DESC) AS rn
FROM audit_log
) AS temp
WHERE rn = 1;