finishing on generation of sql