PTC interview question

What do these SQL statements do and what can be done to improve performance.