Fix sql query, shit should work now