Search
 
SCRIPT & CODE EXAMPLE
 

SQL

min max sql

SELECT MIN(salary), MAX(salary) FROM employees;
SELECT team, MIN(salary), MAX(salary) FROM employees GROUP BY team;
Comment

sql max min

select emp_name, salary
from employees
where salary = (select max(salary) from employees)
union all
select emp_name, salary
from employees
where salary = (select min(salary) from employees);
Comment

min max in sql

SELECT MIN(column_name),
MAX(column_name),
AVG(column_name)
FROM table_name
WHERE condition;
Comment

SQL MAX() and MIN() with Strings

SELECT MIN(first_name) AS min_first_name
FROM Customers;
Comment

PREVIOUS NEXT
Code Example
Sql :: alter or change postgresql sequence counter 
Sql :: bigquery get last month 
Sql :: mysql count table rows 
Sql :: postgre insert select 
Sql :: insert in to table sql 
Sql :: how to write uppercase in sql 
Sql :: declare table variable sql 
Sql :: move table to a different schema 
Sql :: oracle concat datetime 
Sql :: show table mysql 
Sql :: clear table sql 
Sql :: t-sql random number for each row 
Sql :: postgres extract time from timestamp 
Sql :: sql create tabel with primary key auto_increment code 
Sql :: there is no unique constraint matching given keys for referenced table 
Sql :: SQL LIMIT With OFFSET Clause 
Sql :: sql online 
Sql :: checking data type in sql server 
Sql :: location of the log postgresql linux 
Sql :: oracle all dates between two dates 
Sql :: select odd records sql 
Sql :: mssql procedure 
Sql :: from . import _mysql ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory linux 
Sql :: identity syntax in sql 
Sql :: execut sql python 
Sql :: insert many to many sql 
Sql :: copy a table mysql 
Sql :: mariadb create view 
Sql :: mysql is odd 
Sql :: sql date with month and year only 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =