add base class for data query max/min/avg/sum functions