Added ascending in category sql query