Fix SQL definitions (after testing)