added where clause in query

added where clause in query