Add custom SQL to Join