Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 536 Bytes

README.md

File metadata and controls

30 lines (23 loc) · 536 Bytes

mkt

Mean kinetic temperature aggregate function for postgres

input and output temperature in celsius

installation

[Linux]

  1. open your terminal an type
  psql -h localhost -U postgres < MKT_function.sql

Usage example

CREATE TABLE data(temp numeric);
INSERT INTO data VALUES (2), (2), (5), (8),(8),(8),(8);

select mkt(temp) from data;

Result
mkt  
------
 6.25

External links

Wikipedia Temperatura cinética media