Messing with the sql statement