make sql works