Calculate medians for multiple columns in the same table in one query call
问题 StackOverflow to the rescue!, I need to find the medians for five columns at once, in one query call. The median calculations below work for single columns, but when combined, multiple uses of "rownum" throws the query off. How can I update this to work for multiple columns? THANK YOU. It's to create a web tool where nonprofits can compare their financial metrics to user-defined peer groups. SELECT t1_wages.totalwages_pctoftotexp AS median_totalwages_pctoftotexp FROM ( SELECT @rownum :=