@@ -0,0 +1,1495 @@
+package weatherhandler.processor.query;%0A%0Aimport java.io.OutputStream;%0Aimport java.io.PrintStream;%0Aimport java.util.Map;%0Aimport java.util.HashMap;%0Aimport java.lang.AutoCloseable;%0A%0Aimport weatherhandler.data.Measurement;%0Aimport weatherhandler.Logger;%0Aimport weatherhandler.processor.EachProcessor;%0A%0Apublic class AverageTemperature extends EachProcessor implements AutoCloseable %7B%0A    private Map%3CInteger, Averager%3E averages = new HashMap%3C%3E();%0A    private Logger logger = new Logger(%22AverageTemperature%22);%0A    private PrintStream output;%0A%0A    public AverageTemperature(OutputStream out) %7B%0A        this.output = new PrintStream(out);%0A    %7D%0A    public AverageTemperature() %7B%0A        this.output = System.out;%0A    %7D%0A%0A    public void processMeasurement(Measurement m) %7B%0A        averages.computeIfAbsent(m.getStation(), key -%3E new Averager())%0A            .add(m.getTemperature());%0A    %7D%0A%0A    public void close() %7B%0A        this.output.println(%22station%5Ctaverage_temperature%22);%0A        for (int station : averages.keySet()) %7B%0A            this.output.println(%0A                String.join(%22%5Ct%22, new String%5B%5D %7B%0A                    %22%22 + station,%0A                    %22%22 + averages.get(station).get()%0A                %7D)%0A            );%0A        %7D%0A    %7D%0A%0A    private class Averager %7B%0A        private float sum = 0;%0A        private float count = 0;%0A        public void add(float n) %7B%0A            sum += n;%0A            count++;%0A        %7D%0A        public float get() %7B%0A            return sum / count;%0A        %7D%0A    %7D%0A%7D%0A

Add AverageTemperature query class (dump avg. temp. per country to TSV)