Câu 2: C100DEV: MongoDB Associate Developer
A collection coll has the following documents:{_id: 4, type: “A”, value: 60}{_id: 5, type: “B”, value: 80}{_id: 6, type: “A”, value: 30}A collection results has the following documents:{_id: 1, type: “A”, value: 10}{_id: 2, type: “B”, value: 20}{_id: 3, type: “C”, value: 30}After executing the following aggregation pi…
Nội dung câu hỏi
A collection coll has the following documents:{_id: 4, type: “A”, value: 60}{_id: 5, type: “B”, value: 80}{_id: 6, type: “A”, value: 30}A collection results has the following documents:{_id: 1, type: “A”, value: 10}{_id: 2, type: “B”, value: 20}{_id: 3, type: “C”, value: 30}After executing the following aggregation pipeline:db.coll.aggregate([{ $match: { type: “A” }},{ $out: ‘results’} ])What is the result?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. Collection results has the following documents:{_id: 4, type: “A”, value: 60}{_id: 6, type: “A”, value: 30} — đáp án hiện tại
- B. Collection results has the following documents:{_id: 1, type: “A”, value: 10}{_id: 4, type: “A”, value: 60}{_id: 6, type: “A”, value: 30}
- C. Collection results has the following documents:{_id: 1, type: “A”, value: 10}{_id: 2, type: “B”, value: 20}{_id: 3, type: “C”, value: 30}{_id: 4, type: “A”, value: 60}{_id: 6, type: “A”, value: 30}
- D. Collection results has the following documents:{_id: 1, type: “A”, value: 10}{_id: 2, type: “B”, value: 20}{_id: 3, type: “C”, value: 30}{_id: 4, type: “A”, value: 60}{_id: 5, type: “B”, value: 80}{_id: 6, type: “A”, value: 30}
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.