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