Adding template sql calls