select top 10 distinct sellerid, qtysold, percentile_cont(0.5) within group (order by qtysold), median (qtysold) from sales group by sellerid, qtysold; sellerid | qtysold | percentile_cont | median ---+---+---+--- 1 | 1 | 1.0 | 1.0 2 | 3 | 3.0 | 3.0 5 | 2 | 2.0 ...
SQL Menyalin > SELECT sum(col) FROM VALUES (5), (10), (15) AS tab(col); 30 > SELECT sum(col) FILTER(WHERE col <15) FROM VALUES (5), (10), (15) AS tab(col); 15 > SELECT sum(DISTINCT col) FROM VALUES (5), (10), (10), (15) AS tab(col); 30 > SELECT sum(col...