<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mukuri Muturi</title>
    <description>The latest articles on DEV Community by Mukuri Muturi (@funtas_muturi).</description>
    <link>https://dev.to/funtas_muturi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2998104%2F360810da-671a-4590-b51b-526b978c8df7.jpg</url>
      <title>DEV Community: Mukuri Muturi</title>
      <link>https://dev.to/funtas_muturi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/funtas_muturi"/>
    <language>en</language>
    <item>
      <title>INTRODUCTION TO SQL</title>
      <dc:creator>Mukuri Muturi</dc:creator>
      <pubDate>Wed, 16 Apr 2025 12:22:31 +0000</pubDate>
      <link>https://dev.to/funtas_muturi/introduction-to-sql-jo0</link>
      <guid>https://dev.to/funtas_muturi/introduction-to-sql-jo0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdxqgvlc32d4523qe675.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvdxqgvlc32d4523qe675.png" alt="Image description" width="544" height="548"&gt;&lt;/a&gt;&lt;br&gt;
SQL stands for &lt;strong&gt;Standard Query Language&lt;/strong&gt;. It is a domain-specific language used to manage data especially in a relational database management system and is particularly useful in handling structured data.&lt;br&gt;
The main of SQL is to;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieve data&lt;/li&gt;
&lt;li&gt;Store data&lt;/li&gt;
&lt;li&gt;Update data&lt;/li&gt;
&lt;li&gt;Delete data&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Data meant to be manipulated is stored in a Database which can be described as an organized collection of data. &lt;br&gt;
The query language (SQL) is then accessed through a Database Management System. It is basically a software system that allows users to manage and interact with databases.&lt;br&gt;
There are various database management systems used which have different functionalities but for the case of this article, we will be using PostgreSQL which is a Relational database management system (DBMS); meaning it uses tables with rows and columns.&lt;br&gt;
&lt;em&gt;Columns&lt;/em&gt;: these contain the field names of the tables created for example last name or age.&lt;br&gt;
&lt;em&gt;Rows&lt;/em&gt;: they contain the data entered by the user for example John and 18.&lt;/p&gt;

&lt;p&gt;The first thing to understand when dealing with different DBMSs is the datatypes. Most are similar while others aren't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Datatypes in SQL
&lt;/h2&gt;

&lt;p&gt;1.Numerical&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpe0vug8xee2gq52ieyep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpe0vug8xee2gq52ieyep.png" alt="Image description" width="800" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.Character/String - used to refer to text in SQL&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F49fp9iecyfwoguqr66ia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F49fp9iecyfwoguqr66ia.png" alt="Image description" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.Boolean&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjslzw4hrno028eqy7km3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjslzw4hrno028eqy7km3.png" alt="Image description" width="800" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.Date and Time&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wpgnrki1sz143x3mwz9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5wpgnrki1sz143x3mwz9.png" alt="Image description" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we are familiar with what is SQl and the datatypes used, let us 'get our hands dirty' and look at the basic commands used in SQL&lt;/p&gt;

&lt;h2&gt;
  
  
  BASIC SQL COMMANDS
&lt;/h2&gt;

&lt;p&gt;For this article, we will go through the various commands by creating and using tables containing information on my favourite Youtube groups.&lt;br&gt;
1.CREATE. This command is used to create schemas (logical containers within databases that organize database objects like tables, views, indexes, and stored procedures).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk1zgd4z09o71d9soqvm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk1zgd4z09o71d9soqvm.png" alt="Image description" width="800" height="78"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is also used to create tables. The fundamental thing to understand when using SQL is the syntax you are supposed to achieve the desired result. In the case of creating a table, the syntax is;&lt;br&gt;
   &lt;code&gt;CREATE TABLE table_name (&lt;br&gt;
    column_name data type constraint,&lt;br&gt;
    column_name data type constraint...&lt;br&gt;
    ) ;&lt;/code&gt;&lt;br&gt;
&lt;em&gt;It is important to use the correct syntax to avoid errors&lt;/em&gt;&lt;br&gt;
For our example, let us create three tables each with different groups&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa3wa19q1yhl3cnvk0ydt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa3wa19q1yhl3cnvk0ydt.png" alt="Image description" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating the table, it remains empty until we input data into the rows, which leads to us to the next command.&lt;/p&gt;

&lt;p&gt;2.INSERT INTO. Just as its name suggest, this command is used to add data into a table. &lt;br&gt;
The syntax for this command is;&lt;br&gt;
&lt;code&gt;INSERT INTO table_name(&lt;br&gt;
column_name1, column_name2)&lt;br&gt;
VALUES&lt;br&gt;
(value1, value2)--_for the first column_,&lt;br&gt;
(value1, value2);--_for the second column_&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpku7dhv8trip7ubt0k84.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpku7dhv8trip7ubt0k84.png" alt="Image description" width="800" height="792"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When inputting strings/characters, use quotation marks&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;3.SELECT. The select command is used to retrieve data from the database we have created. &lt;br&gt;
It is possible to retrieve everything from a particular table:&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT * FROM table_name;&lt;/code&gt; &lt;em&gt;The star (*) represents everything&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9qddrs30n4c5dsmfz5k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9qddrs30n4c5dsmfz5k.png" alt="Image description" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One can also choose to retrieve some of the columns from the table:&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT column_name1, column_name3&lt;br&gt;
FROM table_name;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbua40tuvl8065btl5eq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbua40tuvl8065btl5eq.png" alt="Image description" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.ALTER. We can also alter the tables we have already created without having to create new ones from scratch.&lt;br&gt;
We can remove a column from the table:&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;ALTER TABLE table_name&lt;br&gt;
drop column column_name;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ha8rxzjjbngcisy091i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ha8rxzjjbngcisy091i.png" alt="Image description" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can add a new column to our table:&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;ALTER TABLE table_name&lt;br&gt;
add column column_name data type constraints;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53jcg95gzp4g4nrdhpxx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F53jcg95gzp4g4nrdhpxx.png" alt="Image description" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the image above, we have successfully created a new column in our SIDEMEN table but we need to add the values in the yellow_cards column.&lt;/p&gt;

&lt;p&gt;5.UPDATE. we use the update command to input change the values in already existing rows or inputting values in newly created columns. Let us add values in the column we created above:&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;UPDATE table_name&lt;br&gt;
SET column_name = CASE reference_column&lt;br&gt;
when reference_value1 then new_value1 &lt;br&gt;
when reference_value2 then new_value2...&lt;br&gt;
end;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwl5tqnyj67roqc0raqd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwl5tqnyj67roqc0raqd.png" alt="Image description" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6.WHERE. It is used to filter the data we are able to retrieve. let us say for example we want to see which members from the AMP group are from New York, we can use the WHERE statement to retrieve data only from these members.&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT * FROM table_name&lt;br&gt;
WHERE column_name = reference_value;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc1fhqyz1ixy63xsnyqu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc1fhqyz1ixy63xsnyqu5.png" alt="Image description" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the result we can see that only Kai and Fanum, who live in Ney York, have been retrieved.&lt;/p&gt;

&lt;p&gt;7.ORDER BY. This command is used to sort our data. For example we can arrange the Betasquad members based on their age. &lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT * FROM table_name&lt;br&gt;
 ORDER BY column_name asc/desc;&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;By default, without specyfying, the order is done in ascending order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ayfkujtfhee0j8aixrs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ayfkujtfhee0j8aixrs.png" alt="Image description" width="800" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wbljxvzuh7icgjfo4nk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wbljxvzuh7icgjfo4nk.png" alt="Image description" width="800" height="304"&gt;&lt;/a&gt;&lt;br&gt;
8.GROUP BY. Used to group and summarize data and makes use of aggregate functions.&lt;br&gt;
syntax (using count() function);&lt;br&gt;
&lt;code&gt;SELECT column_name,&lt;br&gt;
COUNT(*) as new_column_name&lt;br&gt;
FROM table_name&lt;br&gt;
GROUP BY column_name;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
for our example let us group the members of the AMP group according to their cities of residence;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0a5w8hcwyg64v0tbbzam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0a5w8hcwyg64v0tbbzam.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are basic commands, let us now move to Aggregate functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  AGGREGATE FUNCTIONS
&lt;/h2&gt;

&lt;p&gt;These are helpful in analyzing a whole group of rows at once. we will look at the easy functions and tackle the advanced ones later on.&lt;br&gt;
1.COUNT(). Used to count the number of rows.&lt;br&gt;
syntax; &lt;br&gt;
&lt;code&gt;SELECT COUNT(*) as new_table_name&lt;br&gt;
FROM table_name;&lt;/code&gt;&lt;br&gt;
for example to find total number of members in the BETASQUAD group;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85qjdkovs93wyiauture.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F85qjdkovs93wyiauture.png" alt="Image description" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.SUM(). Used to add up numeric values.&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT SUM(column_name) as new_column_name&lt;br&gt;
 FROM table_name;&lt;/code&gt;&lt;br&gt;
for example, let us add up the ages of the networth of the SIDEMEN members;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5u93om7qp6zs7rf219u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5u93om7qp6zs7rf219u.png" alt="Image description" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.AVG(). Used to get the average of numerical values.&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT AVG(column_name) as new_column_name&lt;br&gt;
FROM table_name;&lt;/code&gt;&lt;br&gt;
for example let us calculate the average net worth of the BETASQUAD members;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficbd0x1qhwwhmadzczn9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficbd0x1qhwwhmadzczn9.png" alt="Image description" width="800" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.MAX(). Used to find the maximum among values.&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT MAX(column_name) as new_column_name&lt;br&gt;
FROM table_name;&lt;/code&gt;&lt;br&gt;
for example let us find the maximum net worth among the SIDEMEN members;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8zmy3s0furz14vjcdb9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8zmy3s0furz14vjcdb9p.png" alt="Image description" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5.MIN(). Used to find the minimum among numerical values.&lt;br&gt;
syntax;&lt;br&gt;
&lt;code&gt;SELECT MIN(column_name) as new_column_name&lt;br&gt;
FROM table_name;&lt;/code&gt;&lt;br&gt;
for example let us find the minimum age among the AMP members;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6evlqm1niik436vw650z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6evlqm1niik436vw650z.png" alt="Image description" width="800" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the next article we go through SQL operators, Intermediate SQL functions and many more. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6t1q2dwd0d15e0m12y8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq6t1q2dwd0d15e0m12y8.png" alt="Image description" width="600" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataanalytics</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
