Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11665

NYU: Create Java-based sample app for Aggregate data

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      DoD:
      Create an Atlas free-tier cluster containing a stores.orders collection in it. Orders should have the following form.

      {
       _id: ObjectId(),
       orderPlaced: datetime(),
       total: NumberDecimal("153.00"),
       subtotal: NumberDecimal("141.00"),
       shipping: NumberDecimal("5.00"),
       tax: NumberDecimal("7.00"),
       status: ["shipped", datetime()],
       shippingAddress: {
       number: 345,
       street: Alvin St.,
       city: Madison
       state: WI,
       country: USA
       postalCode: 53558
       },
       lineitems: [
       { sku: "MDBTS001",
       name: "Flannel T-shirt",
       quantity: 10,
       unit_price: NumberDecimal("9.00") },
       { sku: "MDBTS002",
       quantity: 5,
       unit_price: NumberDecimal("10.00")}] 
      }
      

      Write a Java sample application that aggregates this collection using aggregation pipeline. The sample app should have the following methods: 

      • Simple aggregation for count using Accumulator.sum
      • Simple aggregation for average using Accumulator.avg
      • Make use of project in Aggregation Expressions 

      Pull request passes code review and merged

      Attachments

        Activity

          People

            md3822 Meghana Dhage
            md3822 Meghana Dhage
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 41 weeks, 3 days ago