A common task is to filter e.g. detections made within one of the
partner countries. This involves a number of joins to carry the partner
name all the way through to the image or detection table.
This function sets up the required joins and can filter the resulting table
to a single partner by supplying the partner_name argument.