Fix behavior of some aggregate functions wrt missing data
Add min and max aggregate functions for gdt tables