added min, max, count, sum, began work on query