Skip to content

Instantly share code, notes, and snippets.

View milesjordan's full-sized avatar

Miles Jordan milesjordan

  • Melbourne, Victoria
View GitHub Profile
@milesjordan
milesjordan / Circular Average SQL
Last active February 20, 2019 16:31 — forked from hegge/avg_cyclic()
How to get the circular average of a dataset in different databases
These files show how to get the circular average (cyclic mean) of a dataset using SQL, for different databases.
For MySQL an example select statement is shown, and for Oracle and PostgreSQL the way to create a user aggregate function that computes the circular average is shown.
Props to Hegge for kicking this off: https://gist.github.com/hegge/476950