Added support for select query