How to Perform Group By in MongoDB

Hi guy’s , here the query to achieve group by clause in mongodb. we must $group function to make columns into groups . lets see the following queries. To Display All Records of Tables. SCOTT.EMP Table db.getCollection(“SCOTT.EMP”).find({}); 2. To Display Sum of salary of table SCOTT.EMP Table name , SUM aggregate function. SAL column name. […]