Search
 
SCRIPT & CODE EXAMPLE
 

SQL

How to calculate average of average salary of departments?

SELECT 
    ROUND(AVG(average_salary), 0)
FROM
    (SELECT 
        AVG(salary) average_salary
    FROM
        employees
    GROUP BY department_id) department_salary;
Code language: SQL (Structured Query Language) (sql)
Comment

PREVIOUS NEXT
Code Example
Sql :: pl sql join 3 tables 
Sql :: get all jobs if salary more than 5500 less than 10000 sql 
Sql :: mysl like insert a variable 
Sql :: sql varchar(255) 
Sql :: oracle run_duration to number 
Sql :: postgres automatic partioning a table 
Sql :: CREATE MULTIPLE FK 
Sql :: what is unsigned mysql 
Sql :: insert new department and employee record 
Sql :: mysql workbench copy table structure 
Sql :: sql gather statistics to increase performance 
Sql :: debian 10 install postgresql 2ndquadrant 
Sql :: mysql does collate nopad recognize space 
Sql :: fill column postgresql 
Sql :: dump only schema 
Sql :: hoq to import database source 
Sql :: turnicate in mysql 
Sql :: psql check if sql script is valid 
Sql :: mysql if without else 
Sql :: min varias colunas spark sql 
Sql :: fonction stockée pl/sql 
Sql :: Prepared statements in mysql 
Sql :: What logs are available on RDS MySQL? 
Sql :: check constraint is violated 
Sql :: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL 
Sql :: Run batch file from SQL 
Sql :: first row in deluge 
Sql :: how to reset mysql table auto_increment 
Sql :: Mysql select all where count more than" 
Sql :: <sql:datasource var="Snapsho" 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =