<?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>how to use aggregations in mongodb - Wikitechy</title>
	<atom:link href="https://www.wikitechy.com/interview-questions/tag/how-to-use-aggregations-in-mongodb/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.wikitechy.com/interview-questions/tag/how-to-use-aggregations-in-mongodb/</link>
	<description>Interview Questions</description>
	<lastBuildDate>Mon, 04 Apr 2022 11:48:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.wikitechy.com/interview-questions/wp-content/uploads/2025/10/cropped-wikitechy-icon-32x32.png</url>
	<title>how to use aggregations in mongodb - Wikitechy</title>
	<link>https://www.wikitechy.com/interview-questions/tag/how-to-use-aggregations-in-mongodb/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What are Geospatial Indexes in MongoDB ?</title>
		<link>https://www.wikitechy.com/interview-questions/mongodb/what-are-geospatial-indexes-in-mongodb/</link>
					<comments>https://www.wikitechy.com/interview-questions/mongodb/what-are-geospatial-indexes-in-mongodb/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Mon, 04 Apr 2022 11:48:41 +0000</pubDate>
				<category><![CDATA[mongodb]]></category>
		<category><![CDATA[aggregate function in mongodb example]]></category>
		<category><![CDATA[aggregation in mongodb]]></category>
		<category><![CDATA[aggregation operations]]></category>
		<category><![CDATA[aggregation pipeline in mongodb]]></category>
		<category><![CDATA[aggregations in mongodb by example]]></category>
		<category><![CDATA[concept of aggregation in mongodb]]></category>
		<category><![CDATA[how to use aggregations in mongodb]]></category>
		<category><![CDATA[mongodb aggregate functions]]></category>
		<category><![CDATA[mongodb aggregation]]></category>
		<category><![CDATA[mongodb aggregation operators]]></category>
		<category><![CDATA[mongodb aggregation tutorial]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4089</guid>

					<description><![CDATA[It allows you to efficiently execute spatial queries on a collection that contains geospatial shapes and points. It was created by two fields, specify the location field first, then the second field. In MongoDB, it has two types 2dsphere and 2d. Indexes work with spherical geometries that model the surface of the earth based on [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">It allows you to efficiently execute spatial queries on a collection that contains geospatial shapes and points.</li>
<li style="text-align: justify;">It was created by two fields, specify the location field first, then the second field.</li>
<li style="text-align: justify;">In MongoDB, it has two types 2dsphere and 2d.</li>
<li style="text-align: justify;">Indexes work with spherical geometries that model the surface of the earth based on the WGS84 datum is 2dsphere.</li>
<li style="text-align: justify;">In this model, the surface of the earth is an oblate spheroid, meaning that there is some flattening at the poles.</li>
<li style="text-align: justify;">Indexes for points stored on a two-dimensional plane is 2d.</li>
<li style="text-align: justify;">In GeoJSON format 2dsphere allows you to specify geometries for points, lines, and polygons.</li>
<li style="text-align: justify;">A point is given by a two-element array, representing [longitude, latitude].</li>
</ul>
<p>For example,</p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markup code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markup code-embed-code">                                   {<br/>                                          &quot;name&quot; : &quot;New York City&quot;,<br/>                                          &quot;loc&quot; : {<br/>                                                 &quot;type&quot; : &quot;Point&quot;,<br/>                                                 &quot;coordinates&quot; : [50, 2]<br/>                                        }<br/>                                  }</code></pre> </div>
<p>A line is given by an array of points:</p>
<p>For example,</p>
<div class="code-embed-wrapper"> <div class="code-embed-infos"> </div> <pre class="language-markup code-embed-pre line-numbers"  data-start="1" data-line-offset="0"><code class="language-markup code-embed-code">{<br/>                            &quot;name&quot; : &quot;Hudson River&quot;,<br/>                            &quot;loc&quot; : {<br/>                                  &quot;type&quot; : &quot;LineString&quot;,<br/>                                  &quot;coordinates&quot; : [[0,1], [0,2], [1,2]]<br/>                           }<br/>                      }</code></pre> </div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/mongodb/what-are-geospatial-indexes-in-mongodb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What are the aggregate functions of MongoDB ?</title>
		<link>https://www.wikitechy.com/interview-questions/mongodb/what-are-the-aggregate-functions-of-mongodb/</link>
					<comments>https://www.wikitechy.com/interview-questions/mongodb/what-are-the-aggregate-functions-of-mongodb/#respond</comments>
		
		<dc:creator><![CDATA[webmaster]]></dc:creator>
		<pubDate>Mon, 04 Apr 2022 11:28:07 +0000</pubDate>
				<category><![CDATA[mongodb]]></category>
		<category><![CDATA[aggregate function in mongodb example]]></category>
		<category><![CDATA[aggregation in mongodb]]></category>
		<category><![CDATA[aggregation operations]]></category>
		<category><![CDATA[aggregation pipeline in mongodb]]></category>
		<category><![CDATA[aggregations in mongodb by example]]></category>
		<category><![CDATA[concept of aggregation in mongodb]]></category>
		<category><![CDATA[how to use aggregations in mongodb]]></category>
		<category><![CDATA[mongodb aggregate functions]]></category>
		<category><![CDATA[mongodb aggregation]]></category>
		<category><![CDATA[mongodb aggregation operators]]></category>
		<category><![CDATA[mongodb aggregation tutorial]]></category>
		<guid isPermaLink="false">https://www.wikitechy.com/interview-questions/?p=4085</guid>

					<description><![CDATA[The aggregation pipeline consists of stages, and each stage transforms the document in MongoDB. In each state, the documents are taken as input and produce the resultant set of documents are now in the next stage (id available) the resultant documents taken as input and produce output, this process is going on till the last [&#8230;]]]></description>
										<content:encoded><![CDATA[<ul>
<li style="text-align: justify;">The aggregation pipeline consists of stages, and each stage transforms the document in MongoDB.</li>
<li style="text-align: justify;">In each state, the documents are taken as input and produce the resultant set of documents are now in the next stage (id available) the resultant documents taken as input and produce output, this process is going on till the last stage.</li>
<li style="text-align: justify;">In other word, the aggregation pipeline is a multi-stage pipeline.</li>
<li style="text-align: justify;">The basic pipeline stages provide filters that will perform like queries and the document transformation modifies the resultant document, and the other pipeline provides tools for grouping and sorting documents.</li>
<li style="text-align: justify;">In aggregation, there are various functions used:</li>
</ul>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4086 aligncenter" src="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb.png" alt="" width="1110" height="716" srcset="https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb.png 1110w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb-300x194.png 300w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb-1024x661.png 1024w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb-768x495.png 768w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb-390x252.png 390w, https://www.wikitechy.com/interview-questions/wp-content/uploads/2022/04/aggregation-functions-mongodb-820x529.png 820w" sizes="(max-width: 1110px) 100vw, 1110px" /></p>
<h4 id="sum" style="text-align: justify;">Sum :</h4>
<ul style="text-align: justify;">
<li>This aggregation function is used to sum numeric values for the document in each group.</li>
</ul>
<h4 id="count" style="text-align: justify;">Count :</h4>
<ul style="text-align: justify;">
<li>This aggregation function is used to count total number of documents.</li>
</ul>
<h4 id="average" style="text-align: justify;">Average :</h4>
<ul style="text-align: justify;">
<li>This aggregation function is used to calculates the average of all given values from all documents.</li>
</ul>
<h4 id="minimum" style="text-align: justify;">Minimum :</h4>
<ul style="text-align: justify;">
<li>This aggregation function is used to get the minimum value from all the documents.</li>
</ul>
<h4 id="maximum" style="text-align: justify;">Maximum :</h4>
<ul style="text-align: justify;">
<li>This aggregation function is used to get the maximum value from all the documents.</li>
</ul>
<h4 id="first" style="text-align: justify;">First :</h4>
<ul style="text-align: justify;">
<li>This aggregation function is used to get the first document from the grouping.</li>
</ul>
<h4 id="last" style="text-align: justify;">Last :</h4>
<ul>
<li style="text-align: justify;">This aggregation function is used to get the last document from the grouping.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.wikitechy.com/interview-questions/mongodb/what-are-the-aggregate-functions-of-mongodb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
