Fixed the SQL for the standars
(cherry picked from commit dc4569c7c635b581356a03ef80d5495cc4b746be)