working where clause for root resource