AllianceBernstein interview question

How to collected data from joined SQL tables?