the cms sql