preaggregation via sql
refactor
refactor
fix js function settings
fix