fixed the query

and it is working