Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql display max value

SELECT MAX(<numeric column>) FROM <table>;
SELECT MAX(<numeric column>) FROM <table> GROUP BY <other column>;
Comment

sql max value in column

SELECT MAX(salary) FROM employees;
SELECT id, MAX(salary) FROM employees GROUP BY id;

SELECT t1.*
FROM employees t1
INNER JOIN (
    SELECT id, max(salary) AS salary FROM employees GROUP BY id
) t2 ON t1.id = t2.id AND t1.salary = t2.salary;
Comment

find max number in sql

● SELECT first-name, 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 create table query 
Sql :: encrypt and decrypt in sql server 
Sql :: sql remove duplicates 
Sql :: sql get first letter of string 
Sql :: how to run a function in sql 
Sql :: sql select date add day 
Sql :: postgresql procedure example 
Sql :: mysql how to use FIND_IN_SET function in WHERE clause ? 
Sql :: mysqldump database 
Sql :: null column as zero in mysql 
Sql :: mysql disable logging 
Sql :: show details of table postgres 
Sql :: sql use not in 
Sql :: SQL Subtraction Operator 
Sql :: oracle right characters 
Sql :: How to import CSV file into a MySQL table 
Sql :: warning: mysqli::__construct(): (hy000/2002): 
Sql :: order by ip address sql 
Sql :: select the date 30 days less that the todays date sql request 
Sql :: read xml in sql server 
Sql :: between 
Sql :: oracle show error line number 
Sql :: mysql fetch all data 
Sql :: sql statement to change a field value 
Sql :: mysql concat and use as where column 
Sql :: 2nd highest value in sql 
Sql :: print boolean in plsql 
Sql :: how to open mysql in docker 
Sql :: add column postgresql 
Sql :: oracle drop type if exists 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =