Forgot to add sorting statements to the sql