我需要将数据聚合到应用程序并找到数字列的最小值、最大值、平均值
是)我有的
Application income score_1
ax 800 77
ax 900 72
ax 700 62
ax 600 55
我需要的
Application min(income) max(income) avg(income) min(score_1) max(score_1) avg(score_1)
ax 800 900 750 62 77 224.75
我可以写一个查询
select min(income),max(income),avg(income),min(score_1),max(score_1),avg(score_1)
from table name group by application; --IT WORKS..!!
但在表中,我有 20 个数字列,我需要将这些列的最小值、最大值、平均值的统计信息放入表中。有没有什么方法可以完成这项工作,而不是手动编写列名来获取 avg,min ,max