There are several ways to approach this. Option #1 is we could create a view and put that SQL statement in the view, then run LayerGen again against that view. Views are nice, but it seems like a lot of extra overhead if we are only using this statement in one place. Option #2 i...