Added query of sql with results for many instances of a model.