In PostgreSQL database, table T has multiple numeric columns:
We want to find the median of all column values in each row. Below is the expected result:
new()function creates a new two-dimensional table; ~ represents the current record; array() function converts field values of a record to a sequence.
Source link
lol