BAMPFA-272: re-insert SQL clauses to handle Crates
BAMPFA-272: re-insert SQL clauses to handle Crates

itsdavidbaxter/Tools,itsdavidbaxter/Tools,itsdavidbaxter/Tools,itsdavidbaxter/Tools,itsdavidbaxter/Tools,itsdavidbaxter/Tools,itsdavidbaxter/Tools,itsdavidbaxter/Tools