Database query to this data, through the union all ties to the multiple query results, now need to compute a single consumption, is to take the box below to remove all data from the first line of the data and have in addition to the data to display, how to process, is written in SQL is better, or through the Java code to deal with the data in the background?