<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySql Function Archives - The Code Developer</title>
	<atom:link href="https://www.thecodedeveloper.com/tag/mysql-function/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.thecodedeveloper.com/tag/mysql-function/</link>
	<description>The Code Developer is a Programming Blog.</description>
	<lastBuildDate>Fri, 25 Jan 2019 13:36:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>MySQL AVG Function</title>
		<link>https://www.thecodedeveloper.com/mysql-avg-function/</link>
					<comments>https://www.thecodedeveloper.com/mysql-avg-function/#respond</comments>
		
		<dc:creator><![CDATA[Aastha Tyagi]]></dc:creator>
		<pubDate>Sun, 21 Jan 2018 09:18:24 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySql Function]]></category>
		<category><![CDATA[Salary]]></category>
		<guid isPermaLink="false">https://www.thecodedeveloper.com/?p=2514</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="939" height="469" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL AVG" decoding="async" fetchpriority="high" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function.png 939w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function-768x384.png 768w" sizes="(max-width: 939px) 100vw, 939px" /></div>
<p>Introduction to MySQL AVG Function This MySQL tutorial explains how to use the MySQL AVG Function with syntax and examples. The AVG() function returns the average value of a numeric column. AVG() Syntax To understand MySQL AVG Function, consider an &#8220;books&#8221; table, which is having the following records: AVG Function Example Examples 1: The following [&#8230;]</p>
<p>The post <a href="https://www.thecodedeveloper.com/mysql-avg-function/">MySQL AVG Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="939" height="469" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL AVG" decoding="async" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function.png 939w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-AVG-Function-768x384.png 768w" sizes="(max-width: 939px) 100vw, 939px" /></div><h2>Introduction to MySQL AVG Function</h2>
<p>This MySQL tutorial explains how to use the <strong>MySQL AVG</strong> Function with syntax and examples. The AVG() function returns the average value of a numeric column.</p>
<h3>AVG() Syntax</h3>
<pre class="brush: php; title: ; notranslate">
SELECT AVG(column_name)
FROM table_name
WHERE condition;
</pre>
<p>To understand <strong>MySQL AVG</strong> Function, consider an &#8220;books&#8221; table, which is having the following records:</p>
<pre class="brush: php; title: ; notranslate">
SELECT * FROM books;
</pre>
<div id="tablepress-14-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-14" class="tablepress tablepress-id-14 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">BookId</th><th class="column-2">BookName</th><th class="column-3">Price</th><th class="column-4">Author</th><th class="column-5">publishedDate</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">1</td><td class="column-2">Learning PHP, MySQL, and JavaScript</td><td class="column-3">17</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-02-02</td>
</tr>
<tr class="row-3">
	<td class="column-1">2</td><td class="column-2">Ubuntu: Up and Running</td><td class="column-3">23</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-03-23</td>
</tr>
<tr class="row-4">
	<td class="column-1">3</td><td class="column-2">PHP and MySQL Web Development</td><td class="column-3">12</td><td class="column-4">Luke Welling</td><td class="column-5">2017-06-14</td>
</tr>
<tr class="row-5">
	<td class="column-1">4</td><td class="column-2">Murach's PHP and MySQL</td><td class="column-3">14</td><td class="column-4">Joel Murach</td><td class="column-5">2017-06-17</td>
</tr>
<tr class="row-6">
	<td class="column-1">5</td><td class="column-2">Murach's Java Programming</td><td class="column-3">62</td><td class="column-4">Joel Murach</td><td class="column-5">2017-07-28</td>
</tr>
<tr class="row-7">
	<td class="column-1">6</td><td class="column-2">Head first php mysql</td><td class="column-3">22</td><td class="column-4">Lynn Beighley</td><td class="column-5">2017-07-31</td>
</tr>
<tr class="row-8">
	<td class="column-1">7</td><td class="column-2">Head first sql</td><td class="column-3">11</td><td class="column-4">Lynn Beighley</td><td class="column-5">2017-09-10</td>
</tr>
<tr class="row-9">
	<td class="column-1">8</td><td class="column-2">HTML5 for IOS and Android: A Beginner's Guide</td><td class="column-3">4</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-09-12</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-14 from cache -->
<h3>AVG Function Example</h3>
<h4>Examples 1:</h4>
<p>The following SQL statement finds the average price of all books:</p>
<pre class="brush: php; title: ; notranslate">
SELECT AVG(Price) AS  &quot;Avg Price&quot;
FROM books;
</pre>
<div id="tablepress-25-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-25" class="tablepress tablepress-id-25 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">Avg Price</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">20.6250</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-25 from cache -->
<p>Below is a selection from the &#8220;employees&#8221; table, which is having the following records:</p>
<pre class="brush: php; title: ; notranslate">
SELECT * FROM employees;
</pre>
<div id="tablepress-1-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-1" class="tablepress tablepress-id-1 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">id</th><th class="column-2">name</th><th class="column-3">salary</th><th class="column-4">department</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">1</td><td class="column-2">Tom</td><td class="column-3">4000</td><td class="column-4">Technology</td>
</tr>
<tr class="row-3">
	<td class="column-1">2</td><td class="column-2">Sam</td><td class="column-3">6000</td><td class="column-4">Sales</td>
</tr>
<tr class="row-4">
	<td class="column-1">3</td><td class="column-2">Bob</td><td class="column-3">3000</td><td class="column-4">Technology</td>
</tr>
<tr class="row-5">
	<td class="column-1">4</td><td class="column-2">Alen</td><td class="column-3">8000</td><td class="column-4">Technology</td>
</tr>
<tr class="row-6">
	<td class="column-1">5</td><td class="column-2">Jack</td><td class="column-3">12000</td><td class="column-4">Marketing</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-1 from cache -->
<h3>Example 2: With Single Expression</h3>
<p>Now suppose based on the above table you want to know how the average salary of all employees whose salary is above 6000.</p>
<pre class="brush: php; title: ; notranslate">
SELECT AVG(salary) AS &quot;Avg Salary&quot;
FROM employees
WHERE salary &gt; 6000;
</pre>
<div id="tablepress-26-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-26" class="tablepress tablepress-id-26 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">Avg Salary</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">10000.0000</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-26 from cache -->
<h3>Example 3: Using GROUP BY</h3>
<p>In some cases, you will be required to use the <a href="https://www.thecodedeveloper.com/mysql-group/">GROUP BY</a> clause with the AVG function.</p>
<p>For example, you could also use the AVG function to calculate average salary for each department:</p>
<pre class="brush: php; title: ; notranslate">
SELECT department, AVG(salary) AS &quot;Avg salary&quot;
FROM employees
GROUP BY department;
</pre>
<div id="tablepress-27-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-27" class="tablepress tablepress-id-27 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">department</th><th class="column-2">Avg salary</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">Marketing</td><td class="column-2">12000.0000</td>
</tr>
<tr class="row-3">
	<td class="column-1">Sales</td><td class="column-2">6000.0000</td>
</tr>
<tr class="row-4">
	<td class="column-1">Technology</td><td class="column-2">5000.0000</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-27 from cache -->
<p>The post <a href="https://www.thecodedeveloper.com/mysql-avg-function/">MySQL AVG Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thecodedeveloper.com/mysql-avg-function/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL SUM Function</title>
		<link>https://www.thecodedeveloper.com/mysql-sum-function/</link>
					<comments>https://www.thecodedeveloper.com/mysql-sum-function/#respond</comments>
		
		<dc:creator><![CDATA[Aastha Tyagi]]></dc:creator>
		<pubDate>Wed, 17 Jan 2018 16:51:51 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySql Function]]></category>
		<guid isPermaLink="false">https://www.thecodedeveloper.com/?p=2451</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="940" height="470" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL SUM Function" decoding="async" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function.png 940w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function-768x384.png 768w" sizes="(max-width: 940px) 100vw, 940px" /></div>
<p>This MySQL tutorial explains how to use the <strong>MySQL SUM function</strong> with syntax and examples. The <strong>MySQL SUM function</strong> returns the summed value of an expression. </p>
<p>The post <a href="https://www.thecodedeveloper.com/mysql-sum-function/">MySQL SUM Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="940" height="470" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL SUM Function" decoding="async" loading="lazy" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function.png 940w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-SUM-Function-768x384.png 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></div><h2>Introduction to MySQL SUM Function</h2>
<p>This MySQL tutorial explains how to use the <strong>MySQL SUM function</strong> with syntax and examples. The <strong>MySQL SUM function</strong> returns the summed value of an expression. </p>
<h3>SUM() Syntax</h3>
<pre class="brush: php; title: ; notranslate">
SELECT SUM(column_name)
FROM table_name
WHERE condition;
</pre>
<p>To understand <strong>SUM</strong> function, consider an &#8220;OrderDetails&#8221; table, which is having the following records:</p>
<pre class="brush: php; title: ; notranslate">
SELECT * FROM OrderDetails;
</pre>
<div id="tablepress-19-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-19" class="tablepress tablepress-id-19 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">OrderDetailID</th><th class="column-2">OrderID</th><th class="column-3">ProductID</th><th class="column-4">Quantity</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">1</td><td class="column-2">6</td><td class="column-3">44</td><td class="column-4">6</td>
</tr>
<tr class="row-3">
	<td class="column-1">1</td><td class="column-2">2</td><td class="column-3">44</td><td class="column-4">12</td>
</tr>
<tr class="row-4">
	<td class="column-1">2</td><td class="column-2">6</td><td class="column-3">45</td><td class="column-4">7</td>
</tr>
<tr class="row-5">
	<td class="column-1">3</td><td class="column-2">5</td><td class="column-3">78</td><td class="column-4">8</td>
</tr>
<tr class="row-6">
	<td class="column-1">3</td><td class="column-2">4</td><td class="column-3">44</td><td class="column-4">12</td>
</tr>
<tr class="row-7">
	<td class="column-1">4</td><td class="column-2">2</td><td class="column-3">46</td><td class="column-4">10</td>
</tr>
<tr class="row-8">
	<td class="column-1">7</td><td class="column-2">7</td><td class="column-3">32</td><td class="column-4">10</td>
</tr>
<tr class="row-9">
	<td class="column-1">8</td><td class="column-2">6</td><td class="column-3">59</td><td class="column-4">18</td>
</tr>
</tbody>
</table>

</div>
<p>The following MySQL statement finds the sum of the &#8220;Quantity&#8221; fields in the &#8220;OrderDetails&#8221; table:</p>
<pre class="brush: php; title: ; notranslate">
SELECT SUM(Quantity) AS TotalQuantity
FROM OrderDetails;
</pre>
<div id="tablepress-20-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-20" class="tablepress tablepress-id-20 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">TotalQuantity</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">83</td>
</tr>
</tbody>
</table>

</div>
<p>The post <a href="https://www.thecodedeveloper.com/mysql-sum-function/">MySQL SUM Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thecodedeveloper.com/mysql-sum-function/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL MIN Function</title>
		<link>https://www.thecodedeveloper.com/mysql-min-function/</link>
					<comments>https://www.thecodedeveloper.com/mysql-min-function/#respond</comments>
		
		<dc:creator><![CDATA[Aastha Tyagi]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 16:05:34 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySql Function]]></category>
		<guid isPermaLink="false">https://www.thecodedeveloper.com/?p=2389</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="940" height="470" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL MIN" decoding="async" loading="lazy" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN.png 940w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN-768x384.png 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></div>
<p>This MySQL tutorial explains how to use the <strong>MIN</strong> function with syntax and examples. The <strong>MySQL MIN</strong> function returns the minimum value in a set of values.</p>
<p>The post <a href="https://www.thecodedeveloper.com/mysql-min-function/">MySQL MIN Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="940" height="470" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL MIN" decoding="async" loading="lazy" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN.png 940w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MIN-768x384.png 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></div><h2>Introduction to MySQL MIN Function</h2>
<p>This MySQL tutorial explains how to use the <strong>MIN</strong> function with syntax and examples. The <strong>MySQL MIN</strong> function returns the minimum value in a set of values.</p>
<h3>MIN() Syntax</h3>
<pre class="brush: php; title: ; notranslate">
SELECT MIN(column_name)
FROM table_name
WHERE condition;
</pre>
<p>To understand <strong>MIN</strong> function, consider an &#8220;books&#8221; table, which is having the following records:</p>
<pre class="brush: php; title: ; notranslate">
SELECT * FROM books;
</pre>
<div id="tablepress-14-no-2-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-14-no-2" class="tablepress tablepress-id-14 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">BookId</th><th class="column-2">BookName</th><th class="column-3">Price</th><th class="column-4">Author</th><th class="column-5">publishedDate</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">1</td><td class="column-2">Learning PHP, MySQL, and JavaScript</td><td class="column-3">17</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-02-02</td>
</tr>
<tr class="row-3">
	<td class="column-1">2</td><td class="column-2">Ubuntu: Up and Running</td><td class="column-3">23</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-03-23</td>
</tr>
<tr class="row-4">
	<td class="column-1">3</td><td class="column-2">PHP and MySQL Web Development</td><td class="column-3">12</td><td class="column-4">Luke Welling</td><td class="column-5">2017-06-14</td>
</tr>
<tr class="row-5">
	<td class="column-1">4</td><td class="column-2">Murach's PHP and MySQL</td><td class="column-3">14</td><td class="column-4">Joel Murach</td><td class="column-5">2017-06-17</td>
</tr>
<tr class="row-6">
	<td class="column-1">5</td><td class="column-2">Murach's Java Programming</td><td class="column-3">62</td><td class="column-4">Joel Murach</td><td class="column-5">2017-07-28</td>
</tr>
<tr class="row-7">
	<td class="column-1">6</td><td class="column-2">Head first php mysql</td><td class="column-3">22</td><td class="column-4">Lynn Beighley</td><td class="column-5">2017-07-31</td>
</tr>
<tr class="row-8">
	<td class="column-1">7</td><td class="column-2">Head first sql</td><td class="column-3">11</td><td class="column-4">Lynn Beighley</td><td class="column-5">2017-09-10</td>
</tr>
<tr class="row-9">
	<td class="column-1">8</td><td class="column-2">HTML5 for IOS and Android: A Beginner's Guide</td><td class="column-3">4</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-09-12</td>
</tr>
</tbody>
</table>

</div>
<p>The following MySQL statement finds the price of the most cheapest book:</p>
<pre class="brush: php; title: ; notranslate">
SELECT MIN(Price) AS SmallestPrice
FROM books;
</pre>
<div id="tablepress-17-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-17" class="tablepress tablepress-id-17 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">SmallestPrice</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">4</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-17 from cache -->
<p>The following MySQL statement finds the price of the most cheapest book in each author, sorted low to high:</p>
<pre class="brush: php; title: ; notranslate">
SELECT MIN(Price) AS SmallestPrice, Author
FROM books
GROUP BY Author
ORDER BY SmallestPrice ASC;
</pre>
<div id="tablepress-18-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-18" class="tablepress tablepress-id-18 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">SmallestPrice</th><th class="column-2">Author</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">4</td><td class="column-2">Robin Nixon</td>
</tr>
<tr class="row-3">
	<td class="column-1">11</td><td class="column-2">Lynn Beighley</td>
</tr>
<tr class="row-4">
	<td class="column-1">12</td><td class="column-2">Luke Welling</td>
</tr>
<tr class="row-5">
	<td class="column-1">14</td><td class="column-2">Joel Murach</td>
</tr>
</tbody>
</table>

</div><!-- #tablepress-18 from cache -->
<p>The post <a href="https://www.thecodedeveloper.com/mysql-min-function/">MySQL MIN Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thecodedeveloper.com/mysql-min-function/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MySQL MAX Function</title>
		<link>https://www.thecodedeveloper.com/mysql-max-function/</link>
					<comments>https://www.thecodedeveloper.com/mysql-max-function/#respond</comments>
		
		<dc:creator><![CDATA[Aastha Tyagi]]></dc:creator>
		<pubDate>Tue, 09 Jan 2018 09:30:28 +0000</pubDate>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySql Function]]></category>
		<guid isPermaLink="false">https://www.thecodedeveloper.com/?p=2355</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="940" height="470" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL MAX" decoding="async" loading="lazy" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX.png 940w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX-768x384.png 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></div>
<p>This MySQL tutorial explains how to use the <strong>MAX</strong> function with syntax and examples. The <strong>MySQL MAX</strong> function returns the maximum value in a set of values.</p>
<p>The post <a href="https://www.thecodedeveloper.com/mysql-max-function/">MySQL MAX Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="940" height="470" src="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="MySQL MAX" decoding="async" loading="lazy" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX.png 940w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2018/01/MySQL-MAX-768x384.png 768w" sizes="auto, (max-width: 940px) 100vw, 940px" /></div><h2>Introduction to MySQL MAX Function</h2>
<p>This MySQL tutorial explains how to use the <strong>MAX</strong> function with syntax and examples. The <strong>MySQL MAX</strong> function returns the maximum value in a set of values.</p>
<h3>MAX() Syntax</h3>
<pre class="brush: php; title: ; notranslate">
SELECT MAX(column_name)
FROM table_name
WHERE condition;
</pre>
<p>To understand <strong>MAX</strong> function, consider an &#8220;books&#8221; table, which is having the following records:</p>
<pre class="brush: php; title: ; notranslate">
SELECT * FROM books;
</pre>
<div id="tablepress-14-no-3-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-14-no-3" class="tablepress tablepress-id-14 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">BookId</th><th class="column-2">BookName</th><th class="column-3">Price</th><th class="column-4">Author</th><th class="column-5">publishedDate</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">1</td><td class="column-2">Learning PHP, MySQL, and JavaScript</td><td class="column-3">17</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-02-02</td>
</tr>
<tr class="row-3">
	<td class="column-1">2</td><td class="column-2">Ubuntu: Up and Running</td><td class="column-3">23</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-03-23</td>
</tr>
<tr class="row-4">
	<td class="column-1">3</td><td class="column-2">PHP and MySQL Web Development</td><td class="column-3">12</td><td class="column-4">Luke Welling</td><td class="column-5">2017-06-14</td>
</tr>
<tr class="row-5">
	<td class="column-1">4</td><td class="column-2">Murach's PHP and MySQL</td><td class="column-3">14</td><td class="column-4">Joel Murach</td><td class="column-5">2017-06-17</td>
</tr>
<tr class="row-6">
	<td class="column-1">5</td><td class="column-2">Murach's Java Programming</td><td class="column-3">62</td><td class="column-4">Joel Murach</td><td class="column-5">2017-07-28</td>
</tr>
<tr class="row-7">
	<td class="column-1">6</td><td class="column-2">Head first php mysql</td><td class="column-3">22</td><td class="column-4">Lynn Beighley</td><td class="column-5">2017-07-31</td>
</tr>
<tr class="row-8">
	<td class="column-1">7</td><td class="column-2">Head first sql</td><td class="column-3">11</td><td class="column-4">Lynn Beighley</td><td class="column-5">2017-09-10</td>
</tr>
<tr class="row-9">
	<td class="column-1">8</td><td class="column-2">HTML5 for IOS and Android: A Beginner's Guide</td><td class="column-3">4</td><td class="column-4">Robin Nixon</td><td class="column-5">2017-09-12</td>
</tr>
</tbody>
</table>

</div>
<p>The following MySQL statement finds the price of the most expensive book:</p>
<pre class="brush: php; title: ; notranslate">
SELECT MAX(Price) AS MaxPrice
FROM books;
</pre>
<div id="tablepress-15-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-15" class="tablepress tablepress-id-15 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">MaxPrice</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">62</td>
</tr>
</tbody>
</table>

</div>
<p>The following MySQL statement finds the price of the most expensive book in each author, sorted high to low:</p>
<pre class="brush: php; title: ; notranslate">
SELECT MAX(Price) AS MaxPrice, Author
FROM books
GROUP BY Author
ORDER BY MaxPrice DESC;
</pre>
<div id="tablepress-16-scroll-wrapper" class="tablepress-scroll-wrapper">

<table id="tablepress-16" class="tablepress tablepress-id-16 tablepress-responsive">
<thead>
<tr class="row-1">
	<th class="column-1">MaxPrice</th><th class="column-2">Author</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1">62</td><td class="column-2">Joel Murach</td>
</tr>
<tr class="row-3">
	<td class="column-1">23</td><td class="column-2">Robin Nixon</td>
</tr>
<tr class="row-4">
	<td class="column-1">22</td><td class="column-2">Lynn Beighley</td>
</tr>
<tr class="row-5">
	<td class="column-1">12</td><td class="column-2">Luke Welling</td>
</tr>
</tbody>
</table>

</div>
<p>The post <a href="https://www.thecodedeveloper.com/mysql-max-function/">MySQL MAX Function</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thecodedeveloper.com/mysql-max-function/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
