Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to get max from each department in sql

SELECT firstname, MAX(salary)
FROM department d LEFT OUTER JOIN employee e
ON (d.department_id = e.department_id)
GROUP BY department_id; 
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql get only the field names in a table 
Sql :: postgres date 
Sql :: mysql two joins 
Sql :: Sequelize model datatype of enum 
Sql :: create db table 
Sql :: what is non relational database 
Sql :: sql server datetime 
Sql :: sql like case sensitive 
Sql :: mysql default port number 
Sql :: sqlite modify row 
Sql :: insert into postgres 
Sql :: SQL Server OPENQUERY WITH result SETS 
Sql :: oracle drop type 
Sql :: show specific events on mysql 
Sql :: timestamp sql 
Sql :: how to start with sql 
Sql :: mysql extract day from date leading zero 
Sql :: pgadmin check database 
Sql :: postgresql having 
Sql :: get specific column in mongodb 
Sql :: check if table is Temporal 
Sql :: show database not empty tables postgres 
Sql :: Get a list of tables and the primary key 
Sql :: mysql order by rand limit 1 really slow 
Sql :: Inserting data into different tables at once in oracle sql 
Sql :: oracle merge insert if not exists 
Sql :: 0 
Sql :: truncate table sql server foreign key 
Sql :: linq inner join 
Sql :: less than and between in sql query 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =