So rather than creating a table, I wanted to pass a list of numbers and see what happens. This is how I achieved it :
SELECT median(val) over() FROM (
SELECT * from (SELECT 1 as val, 1 as row
UNION SELECT 2, 2
UNION SELECT NULL,3
UNION SELECT NULL,4
UNION SELECT 4,5)temp
)temp2;
No comments:
Post a Comment