Beyond, Inc. interview question

Question on SQL and relationship database usage.