New function override createQuery SQL