BOLT interview question

implementing a queue, basic SQL