OnGraph Interview Question

Basically asked about SQL query related question