Implemented select queries and basic conditions.