renamed getSQL to getSql