Tumblr interview question

Nothing too difficult. Some basic sql