mongodb-aggregation-pipeline
Installation
SKILL.md
MongoDB Aggregation Pipeline
Master powerful data transformation with aggregation pipeline.
Quick Start
Basic Pipeline Structure
const result = await collection.aggregate([
{ $match: { status: 'active' } },
{ $group: { _id: '$category', count: { $sum: 1 } } },
{ $sort: { count: -1 } },
{ $limit: 10 }
]).toArray();