adding query --> sql method