autodetect *some* aggregate sql functions for now