Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql highest salary by location

/*  Highest salary by Department/Location   */
SELECT e.ename, e.sal, e.deptno, d.loc
FROM emp e
JOIN dept d
ON e.deptno = d.deptno
WHERE e.sal in
( 	
  	select max(sal) 
  	from emp 
  	group by deptno
)
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql workbench format date 
Sql :: sql rename column in select 
Sql :: How do I UPDATE from a SELECT in SQL Server? 
Sql :: plpgsql coalesce equivalent for empty string 
Sql :: demmarrer un service mysql teminal cmd 
Sql :: how to add new column with default value in sql server 
Sql :: sql trying to delete database in use 
Sql :: sql get actual fiscal year 
Sql :: select count concat string sql server 
Sql :: check ksql db health 
Sql :: hour must be between 1 and 12 
Sql :: python sqlalchemy orm to select null values 
Sql :: exclude last comma separated string mysql 
Sql :: execution order in sql 
Sql :: replace sql 
Sql :: Host ' is not allowed to connect to this MySQL server 
Sql :: sql recursive query 
Sql :: sql primary key 
Sql :: postgresql populate data random 
Sql :: sqlalchemy existing db file 
Sql :: not equal in mysql query 
Sql :: mysql select smaller of two values 
Sql :: inserted row count tsql 
Sql :: select top values sql 
Sql :: normalization in sql 
Sql :: postgres disable foreign keys 
Sql :: read sql file in python pandas 
Sql :: SQL Addition Operator 
Sql :: SQL UNIQUE Constraint 
Sql :: json object to column value in sql server 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =