select and where condition added