select_instances function

Select instances of a flat table by value