Skip to content

Rbl#31

Open
r3belchain wants to merge 12 commits into
Ethereum-Jakarta:mainfrom
r3belchain:main
Open

Rbl#31
r3belchain wants to merge 12 commits into
Ethereum-Jakarta:mainfrom
r3belchain:main

Conversation

@r3belchain
Copy link
Copy Markdown

Add "warehouse-system-sql"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice ada SS view query nya

Comment thread warehouse-mongoDB/app.js Outdated
Comment on lines +123 to +147
async function aggregateProductInventory() {
try {
const inventoryCollection = db.collection("Inventory");

const viewResults = await inventoryCollection.aggregate([
{
$lookup: {
from: "Products",
localField: "product_id",
foreignField: "_id",
as: "productDetails",
},
},
{
$unwind: "$productDetails",
},
{
$project: {
_id: 0,
product_name: "$productDetails.product_name",
quantity: 1,
location: 1,
},
},
]).toArray();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice aggregate, ini paling penting sih

Copy link
Copy Markdown
Contributor

@zexoverz zexoverz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

udah oke, bisa dilanjut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants