Added a few helper functions for generating pieces of sql statement