Akamai Interview Question

Find the Town Judge problem. Finished early so I got asked a SQL based question (sorting data)