Created option for sql query