Aspire Systems interview question

oops and sql queries basic