Mean kinetic temperature aggregate function for postgres
input and output temperature in celsius
[Linux]
- open your terminal an type
psql -h localhost -U postgres < MKT_function.sql
CREATE TABLE data(temp numeric);
INSERT INTO data VALUES (2), (2), (5), (8),(8),(8),(8);
select mkt(temp) from data;
mkt
------
6.25
Wikipedia Temperatura cinética media