TubeMogul interview question

Reverse a Singly Linked List and SQL Query (GroupBy and Joins)