select_instances_by_comparison function

Select instances of a flat table by comparison