fix typo and add SQL