With a post select hook you can run code after the select block. For example you can run UPDATE.
UPDATE
{{ block "PRE_SELECT_HOOKS" . }} UPDATE {{ .This }} SET blub=14 WHERE "date2" BETWEEN '{{ .StartDate }}' and '{{ .EndDate }}' {{end}}