Fresher interview question

Array, select query, join , loop