Lightspeed interview question

basic algorithmic and sql questions, a lot about tuning and debugging