How can I find median in sql


#1

How can I find median in sql.
I am trying

select date, sum(amount), median(amount), count(user) from table
group by 1

It shows an error that function median(double precision) does not exist