IBM interview question

coding round with easy code and a sql question