Interview Q&A / SQL & DBMS
SQL & DBMS interview questions
Joins, keys, normalisation, indexes and transactions for placement and backend interviews.
Prefer rapid revision? Practise SQL & DBMS short interview answers →
- What do LAG and LEAD do in SQL?
LAG returns a value from a previous row and LEAD from a following row, within the window order. They compare a row to its neighbour without a self join.
IntermediateQuick answer1 min read