Looking for a Tutor Near You?

Post Learning Requirement »
x

Choose Country Code

x

Direction

x

Ask a Question

x

x
x
x
Hire a Tutor

ORACLE SQL

Loading...

Published in: Oracle Training
687 Views

ORACLE SQL

Debarun S / Kolkata

10 years of teaching experience

Qualification: B.Tech

Teaches: Computer, Mathematics, Science, Chemistry, Computer Science, Physics, School Level Computer, Defence Exams, IBPS, Insurance Exams, SSC Exams

Contact this Tutor
  1. SQL MIN() and MAX() Functions The SQL MIN() and MAX() Functions The MIN() function returns the smallest value of the selected column. The MAX() function returns the largest value of the selected column. MIN() Syntax SELECT FROM table name WHERE condition; MAX() Syntax SELECT FROM table name WHERE condition; Demo Database Below is a selection from the "Products" table in the Northwind sample database: ProductID 1 2 3 4 5 ProductName Chais Chang Aniseed Syrup SupplierID CategoryID Unit Price 1 1 1 1 1 2 2 2 10 boxes x 20 bags 18 24 - 12 oz bottles 19 12 - 550 ml bottles 10 Chef Anton's Cajun Seasoning 2 Chef Anton's Gumbo Mix 2 48 - 6 oz jars 36 boxes 22 21.35 MIN() Example The following SQL statement finds the price of the cheapest product: Example
  2. SELECT MIN(Price) AS SmallestPrice FROM Products; MAX() Example The following SQL statement finds the price of the most expensive product: Example SELECT MAX(Price) AS LargestPrice FROM Products;