Added range query for single attributes and test