I'm just putting my SQL code out for review:
Would it have been better to do this in a single review? Or is the style of doing logical units better?
For large amounts of code...yes I would definitely consider breaking it up. However, you should do so logically to aid understanding. Perhaps certain sections of your code achieve a certain task/goal and you can extract those sections for review asking the community whether there would a better way to satisfy the goals of those sections. Just a suggestion though, all I know is I'd find it very difficult to digest pages of code and then review it :)
Here are my suggestions based on looking at your posts(Layer4, Layer3):