Added where condition in query