Added ability to have a where clause

Only works with strings at the moment
Added ability to query for max value with filter

This should be handy for stateless synching between other systems