Question

In MongoDB there is the collection db.CustomerInfo.insert( [{ "name": "Tim",Age:24,Reviews:100},{"name": "jill", Age:25, Reviews:20},{"name":"tom", Age:28, Reviews:5},{"name":"Bill", Age:20,...

In MongoDB there is the collection

db.CustomerInfo.insert( [{ "name": "Tim",Age:24,Reviews:100},{"name": "jill", Age:25, Reviews:20},{"name":"tom", Age:28, Reviews:5},{"name":"Bill", Age:20, Reviews:120}])

1. What is the script to remove the customer with name jill

2. What is the script to remove customers with more than 90 reviews

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. Remove Record with the name of jill

db.CustomerInfo.remove({name: "jill"}, true);

it will remove the first document/record from the collection. if we want to delete everything which has name jill then we can remove the true from the query.

2. Remove Record with Reviews greater than 90. Here $gt is greater than and we can use $lt for less than function.

db.CustomerInfo.remove({Reviews:{$gt:90}});

If you have any query regarding this please comment below.

Thank you!!!

Add a comment
Know the answer?
Add Answer to:
In MongoDB there is the collection db.CustomerInfo.insert( [{ "name": "Tim",Age:24,Reviews:100},{"name": "jill", Age:25, Reviews:20},{"name":"tom", Age:28, Reviews:5},{"name":"Bill", Age:20,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Explain 20 please 100 Age 591 Questions 17 - 21 are based on the graph to...

    Explain 20 please 100 Age 591 Questions 17 - 21 are based on the graph to the right. This graph describes the age structure of a population 96-991 17. The fraction of the youngest age class is 90-941 a. The largest in the population 85-891 80-841 b. The smallest in the population 75-79 C. Larger than that of middle age classes (30 - 60 70-74 85-89 years old) 60-64 d. Smaller than that of middle age classes (30 - 60...

  • Name Gender Designation SSN Age Wlliam Johnson M Officer 222-22-1111 25 Mike Smith M Intern 333-33-1111...

    Name Gender Designation SSN Age Wlliam Johnson M Officer 222-22-1111 25 Mike Smith M Intern 333-33-1111 22 Tom Walker M Accountant 200-20-2000 23 Jared Smith M CEO 211-11-2111 20 Walker Johnson M CFO 300-00-0122 21 William Smith M Supervisor 123-12-1234 28 Haley Smith F Asst. Supervisor 234-23-2345 29 Sheley Homes F Safety Mngr 555-55-5656 22 Kate Winslate F Receptionist 258-25-8888 24 Jack Dawson M Operator 1 235-21-0000 27 Beth Kenyatta F Operator 2 411-33-2546 30 Simba Wetu M Inspector 365-25-1234...

  • Age Hours of Sleep Hours of sleep Foot Household Last Name (weekday) Weekend Gender Coin Toss...

    Age Hours of Sleep Hours of sleep Foot Household Last Name (weekday) Weekend Gender Coin Toss Call Integer Height (in.) sizea Letters Best Pet Eye Color 17 7.25 9.5 MT 428 72 6 7 Dogs Blue 19 7.5 6.5FH 324 67 410 Dogs Blue 18 6 8 MT 4 28 73 35 Dogs Brown 18 8 10 MH 425 68 4 5 Dogs Brown 25 7.5 6.75 F T 424 64 5 12 Dogs Brown 22 8 11 F T...

  • Problem 7-4 Uncollectible accounts [LO7-5, 7-6] Raintree Cosmetic Company sells its products to c...

    Problem 7-4 Uncollectible accounts [LO7-5, 7-6] Raintree Cosmetic Company sells its products to customers on a credit basis. An adjusting entry for bad debt expense is recorded only at December 31, the company’s fiscal year-end. The 2017 balance sheet disclosed the following: Current assets: Receivables, net of allowance for uncollectible accounts of $30,000 $432,000 During 2018, credit sales were $1,750,000, cash collections from customers $1,830,000, and $35,000 in accounts receivable were written off. In addition, $3,000 was collected from a...

  • EIN3235 Name: Question No. (a) (b) (c) (d PID: o OO o O Oo o o...

    EIN3235 Name: Question No. (a) (b) (c) (d PID: o OO o O Oo o o O 12 13 o O O 15 16 O ooO 18 Use the following data to answer questions 1-s 36, 25, 24, 13, 12, 24, 35, 48, 24 1. What is the mean? a. 28.65 b. 26.78 2. What is the median? c 27.82 d. 25.78 c 25 d. 26 3 What is the first quartile of the data? 18.5 d. 145 4. What...

  • Work Depot sells office supplies to area corporations and organizations. Tom Dooley, founder and CEO, has...

    Work Depot sells office supplies to area corporations and organizations. Tom Dooley, founder and CEO, has been disappointed with the operating results and the profit margin for the last two years. Business forms are mostly a "commodity" business with low profit margins. To increase profit margins and gain competitive advantages, Dooley introduced "Desk-Top Delivery" service (smaller orders, same-day delivery). The business seems to be as busy as ever. Yet, the operating income has been declining. To help identify the root...

  • Check my workCheck My Work button is now enabled1 Item 2 Item 2 20 points Raintree...

    Check my workCheck My Work button is now enabled1 Item 2 Item 2 20 points Raintree Cosmetic Company sells its products to customers on a credit basis. An adjusting entry for bad debt expense is recorded only at December 31, the company’s fiscal year-end. The 2020 balance sheet disclosed the following: Current assets: Receivables, net of allowance for uncollectible accounts of $43,000 $ 497,000 During 2021, credit sales were $1,815,000, cash collections from customers $1,895,000, and $52,000 in accounts receivable...

  • Imagine that you are a consultant who is building a statistical model to predict how long...

    Imagine that you are a consultant who is building a statistical model to predict how long a customer will remain with a firm (i.e., customer retention). Research demonstrates that both consumer satisfaction and calculated brand commitment should help predict customer retention. Consumer satisfaction is defined as a customer’s overall evaluation of the performance of a product or service to date.78 Calculated brand commitment is a consumer’s dependence on a brand’s benefits due to a lack of choices or switching costs.79...

  • Problem 5 (7 marks) A survey of 25 retail stores revealed that the average price of...

    Problem 5 (7 marks) A survey of 25 retail stores revealed that the average price of a DVD was $375 with a standard deviation of $20. a) What is the 95% confidence interval to estimate the true cost of the DVD? (4 marks) b) What sample size would be needed to estimate the true average price of a DVD with an error of +55 and a 99% confidence? (3 marks) Problem 6 (10 marks) Based on the BBM TV ratings,...

  • Bar Stool Economics Suppose that every day, ten men go out for beer and the bill...

    Bar Stool Economics Suppose that every day, ten men go out for beer and the bill for all ten comes to $100. If they paid their bill the way we pay our taxes, it would go something like this: The first four men (the poorest) would pay nothing. The fifth would pay $1. The sixth would pay $3. The seventh would pay $7. The eighth would pay $12. The ninth would pay $18. The tenth man (the richest) would pay...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT