Google interview question

Advanced SQL Coding QNs + Behavioural