With composite sort keys it is possible to define hierarchical (one-to-many) relationships in data that can be queried at any level of the hierarchy.
For example, in a table listing geographical locations, the sort key could be structured as follows:
[country]#[city]#[founded_date]#[population]
Based on the best practices for using sort keys to organize data it should be possible to make efficient range queries for a list of locations at any one of these levels of aggregation, from country, to population, and everything in between.
How can I compose a query e.g. to get all items where the city name starts with "new", was founded prior to 3/14/1923 and has a population greater than 100'000?