added the query at sample level based on fields. 

It is very limited on purpose, I'll open more functions if they are needed.
you mean this sucks, right ? this forbids you to compare int to floats. This does not affect this scope, because we have no ints, but still, I am clearly not happy with that. However, anything more complex would take way too much time and would definitely be unworthy of the time spent. 
the fun thing is that I do my dictionnary calls without .get on purpose, because if they fail at this point, this means my previous tests somehow failed and I really want to see that should it happen.

I usually keep comments on lines that lack verbosity. This might not be much, but this is typically the kind of question someone might ask, so I'd rather have it in plain sight.