Database system project#1 - sql query version