Sql generation by node sql