Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1) Create a database

Create a Collection in the same database

Q2 .Insert a document into the collection.

Ans.

employee ({

eid:107,

ename:"ss",

age:39,

gender:"M",

salary:55400,

job:"sales_man",

phone:9167843678,

address:{houseno:101,

city:"indirapuram",

state:"up",

zip:112876},

deptno:20})

Q3. Display the documents in that collection in a good format.

Q4.Display the name of all employees

Q5.Display the name and age of all employees.

Q6.Display the name and age of all employees but not their ids.

Q7..Display the details of employees whose name is x

Q8.Display name and age of the employees whose name is x

9. Display the name,age and salaryof all employees whose salary is greater than
50,000.
10 . Display the details of all female employees

11. Display the name and job and dept_num of all female employees who is not 30 till
now year old.(and )

12. Display the details of all female employees who works in dept_num=30 or 20.(OR
operator)

13. Display the name and id of all employees who works in ($IN operator)

14.Display detail of employees who comes under the age group 30-35

You might also like