Trunkoz Group interview question

sql queries,exception handling