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 :: mysql date_format 
Sql :: declare variable in mysql 
Sql :: how to check default value of column in sql server 
Sql :: sql add calculated column 
Sql :: mysql query to select the highest value 
Sql :: date format in oracle 
Sql :: sql vs nosql 
Sql :: convert minutes to hours sql 
Sql :: Select All From A Table In A MySQL Database 
Sql :: sql rownum 
Sql :: back up stored procedures mysql 
Sql :: sql select like 
Sql :: sum row in sql 
Sql :: fetlife 
Sql :: querry mysql by 2 columns 
Sql :: round border button tkinter 
Sql :: mssql coalesce 
Sql :: insufficient privileges while creating view in sql oracle 
Sql :: full-text index mysql 
Sql :: alter database datafile maxsize 32g 
Sql :: sql alternative to max statement 
Sql :: keys in sql with example 
Sql :: Truncate a table then insert data 
Sql :: convert Date to LocalDate via SQLDate 
Sql :: sql min 
Sql :: how to fetch data from database without last column 
Sql :: sql subquery 
Sql :: update statement postgres 
Sql :: mysql large import 
Sql :: create database with hyphen sign mysql 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =