LPS-43753 Add in custom SQL
LPS-43753 Simplify
LPS-43753 Regenerate