你怎么能找到比平均销售更大的东西 [英] how can u find out greater than avg salery
本文介绍了你怎么能找到比平均销售更大的东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的桌子名是emp;
字段:
EMPID int,EMPNAME char(50 ),工资浮动
我希望在oracle中获得超过平均工资。请帮帮我。
谢谢。
解决方案
这对你有用,在Oracle中。
SELECT * - 最后选择记录
FROM table_name - 表
WHERE column_name> ( SELECT AVG(column_name) FROM table_name) - 条件
您需要选择要比较的值,选择平均值,然后与要获得的列进行比较。有关在Oracle SQL中使用AVG()
函数的更多信息,请阅读此Stack Overflow线程 [ ^ ]。
My table name is emp;
Fields:
EMPID int, EMPNAME char(50), salary float
I want greater than avg salary in oracle. Please help me.
Thank you.
解决方案
This would work for you, in Oracle.
SELECT * -- Finally select the records FROM table_name -- Table WHERE column_name > (SELECT AVG(column_name) FROM table_name) -- Condition
You need to select a value to compare against, select the average value and then compare against the column you want to get. For more usingAVG()
function in Oracle SQL, read this Stack Overflow thread[^].
这篇关于你怎么能找到比平均销售更大的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文