query for fetcing games