TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

SQLite MIN Function

SQLite MIN Function with history, features, advantages, installation, commands, syntax, datatypes, operators, expressions, databases, table, crud operations, clauses, like, glob, limit, and clause, advance sqlite

<< Back to SQLITE

SQLite MIN Function

SQLite MIN function is used to fetch the minimum value of an expression.

Syntax:

SELECT MIN(aggregate_expression)
FROM tables
[WHERE conditions]; 

Syntax when you use Min function with GROUP BY clause:

SELECT expression1, expression2, ... expression_n
MIN(aggregate_expression)
FROM tables
[WHERE conditions]
GROUP BY expression1, expression2, ... expression_n; 

Example1:

We have a table named "STUDENT", having the following data:

Sqlite Min function 1

Retrieve the lowest fees of the student from the "STUDENT" table:

SELECT MIN(FEES) AS "Lowest Fees"
FROM STUDENT; 

Output:

Sqlite Min function 2

Example2:

Using GROUP BY clause with MIN function:

Retrieve NAME and MIN FEES from the table "STUDENT" and ORDER BY the data by NAME:

SELECT NAME, MIN(FEES) AS "Lowest Fees"
FROM STUDENT
WHERE ID <= 5
GROUP BY NAME; 

Output:

Sqlite Min function 3
Next TopicSQLite Max




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf