1- Write SQL query to display instructors' last name, salary, bonus, school code for all school names...
Question:
1- Write SQL query to display instructors' last name, salary, bonus, school code for all school names that start with letter 'A' or 'C'. If the bonus is blank, show message Unknown and the heading should be Bonus. Sort the output by salary ascending. Do NOT use Join method.
2-Given following data in the participants collection
{
"_id" : 5,
"quizzes" : [
{ "wk": 1, "score" : 10 },
{ "wk": 2, "score" : 8 },
{ "wk": 3, "score" : 5 },
{ "wk": 4, "score" : 6 }
]
}
What is the output produced by the following mongoDB operation?
db.participants.updateOne(
{ _id: 5 },
{
$push: {
quizzes: {
$each: [ { wk: 5, score: 8 }, { wk: 6, score: 7 }, { wk: 7, score: 6 } ],
$sort: { score: -1 },
$slice: 3
}
}
}
)
3- Write MongoDB command to insert a document into employee collection using the following data
{"Employeeid": 1, "EmployeeName":"Tanvir"}
4- The following questions are related to products and students collection in MongoDB
A- Write a MongoDB query to return id, name, price, and type for products that do have the type key. B- Wri te a MongoDB query to return id, name, price, and type for products that their type is both Capital Goods and Finance. C- W rite an update statement to modify the value of the program field to "BTM" for all documents in the students collection. D- Write an update statement to remove the term field from documents of the students collection where the value of the term field is 3.