Compare commits

..

No commits in common. "37fc21421dd8a2bc21910e4059dce66ff6ee61b8" and "fed7e0adb199b8b484d017fec8ef5e4f87eb03fc" have entirely different histories.

2 changed files with 9 additions and 9 deletions

View File

@ -6,7 +6,7 @@
> Use Employee database created in Assignment B-01 and perform following aggregation operation
> Refer [Queries-B1](https://git.kska.io/sppu-te-comp-content/DatabaseManagementSystems/src/branch/main/Practical/Assignment-B1/Queries-B1.md)
1. Return Designation with Total Salary Above 20000:
1. Return Designation with Total Salary Above 200000:
```mongodb
db.Employee.aggregate([
{
@ -17,18 +17,18 @@ db.Employee.aggregate([
},
{
$match: {
TotalSalary: { $gt: 20000 }
TotalSalary: { $gt: 200000 }
}
}
])
```
2. Find Employee with Total Salary for Each City with Designation "Developer":
2. Find Employee with Total Salary for Each City with Designation "DBA":
```mongodb
db.Employee.aggregate([
{
$match: { Designation: "Tester" }
$match: { Designation: "DBA" }
},
{
$group: {
@ -40,11 +40,11 @@ db.Employee.aggregate([
```
3. Find Total Salary of Employee with Designation "Tester" for Each Company:
3. Find Total Salary of Employee with Designation "DBA" for Each Company:
```mongodb
db.Employee.aggregate([
{
$match: { Designation: "Tester" }
$match: { Designation: "DBA" }
},
{
$group: {
@ -94,11 +94,11 @@ db.Employee.aggregate([
```
7. Return Separate Value in the Expertise Array Where Name of Employee is "Aditya":
7. Return Separate Value in the Expertise Array Where Name of Employee is "Swapnil":
```mongodb
db.Employee.aggregate([
{
$match: { "Name.FName": "Aditya" }
$match: { "Name.FName": "Swapnil" }
},
{
$unwind: "$Expertise"
@ -192,7 +192,7 @@ db.Employee.reIndex()
6. Drop Index on Remove Specific Index:
```mongodb
db.Employee.dropIndex("Designation_1")
db.Employee.dropIndex("empIndex")
```