Amazon interview question

Tech interview was basic SQL questions. The loop being highly focussed on the LPs.