runs but gives different results than mysql