PTC interview question

Advanced SQL queries and functions