Question

MONGODB Questions (NOSQL) Task 9: Describe a scenario and write a query that uses any two...

MONGODB Questions (NOSQL)

Task 9: Describe a scenario and write a query that uses any two of these functions: $concat, $substr, $toLower, $toUpper

Scenario:

Task 10: Describe a scenario and write a query that uses any two of these functions: $add, $divide, $mod, $multiply, $subtract

Scenario:

Task 11: Describe a scenario and write a query that uses $redact, $$descend and $$prune command

Scenario:

Homework Answers

Answer #1

Task 9:

Scenario: Consider that we have a student database which contains student name, age, class, ect. Consider we have different student name in the database such as john, mike, miller. We need to perform some of the SQL functions.

The SQL query to convert the name mike into lowercase is as follows,

SELECT name from student

WHERE LOWER (First_name) = 'mike';

The SQL query to convert the name john into uppercase is as follows,

SELECT name from student

WHERE UPPER (First_name) = 'john';

Know the answer?
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
Similar Questions