SQL Sanity Checks

Added SQL checks to the majority of SQL files in CEG.