Fractal interview question

They asked me to write sql queries