fixes #23 - sql filter needed to name table instances for use in the inner joins