Interview Q&A / SQL & DBMS

INTERVIEW Q&A · 69 QUESTIONS

SQL & DBMS interview questions

Joins, keys, normalisation, indexes and transactions for placement and backend interviews.

  1. 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