Search
 
SCRIPT & CODE EXAMPLE
 

SQL

FIND AVERAGE SALARY EARNER IN SQL

SELECT FIRST_NAME FROM EMPLOYEES
WHERE SALARY = (SELECT AVG(SALARY) FROM EMPLOYEES);
Comment

FIND ABOVE AVERAGE SALARY EARNER IN SQL

SELECT FIRST_NAME, LAST_NAME
FROM EMPLOYEES
WHERE SALARY > (SELECT AVG(SALARY) FROM EMPLOYEES);
Comment

above average salary in sql

SELECT FIRST_NAME FROM EMPLOYEES
WHERE SALARY > (SELECT AVG(SALARY) FROM EMPLOYEES);
Comment

find below average salary in sql

SELECT first_name, salary FROM employees
WHERE salary <= (SELECT AVG(salary) FROM employees); 
Comment

PREVIOUS NEXT
Code Example
Sql :: Truncate a table then insert data 
Sql :: sql server inner join 
Sql :: foreign key in sql dbms 
Sql :: mariadb used space 
Sql :: oracle sql get value from several rows and concatenate strings 
Sql :: sql create database statement 
Sql :: mysql select smaller of two values 
Sql :: create a table from one field of another table 
Sql :: learn sql 
Sql :: how to get the previous day on mysql 
Sql :: open cursors in oracle 
Sql :: sql select statements 
Sql :: query only first letter string 
Sql :: find duplicates in column sql 
Sql :: how to install mysql workbench in ubuntu 20.04 
Sql :: join three tables sql 
Sql :: what are the data types in sql 
Sql :: sql not operator 
Sql :: sql ssrs 
Sql :: sql delete dastabase 
Sql :: mysql run file command 
Sql :: auto increment psql not primary key 
Sql :: mysqlimport 
Sql :: between in sql 
Sql :: sql from 
Sql :: union all in sql 
Sql :: are both the inserted and deleted tables used in update trigger 
Sql :: order records by nearby cordinates sql 
Sql :: sysdatetimeoffset 
Sql :: HOW to select specific table data from an mysql databse server: 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =