I have following hive table with following data, I am trying to find lowerbound(MAX + AVG) and upperbound(MIN - AVG) values for each Instance and name combination by combining a