fix query for affordable resources