Dataset Viewer
Auto-converted to Parquet Duplicate
Schema
stringclasses
10 values
prompts
stringlengths
18
200
query
stringlengths
27
751
conversations
listlengths
2
2
{ "database": { "name": "devops_log_event_db", "collections": [ { "name": "applications", "fields": { "_id": "ObjectId", "app_id": "String", "name": "String", "description": "S...
Gets the latest 50 logs from a specific host.
db.logs.find({ host: "server-01" }).sort({ timestamp: -1 }).limit(50);
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"devops_log_event_db\", \"collections\": [{\"name\": \"applications\", \"fields\": {\"_id\": \"ObjectId\", \"app_id\": \"String\", \"name\": \"String\", \"description\": \"String\", \"environment\": \"String\", \"owner\": \"Strin...
{ "database": { "name": "smartcity_iot_db", "collections": [ { "name": "sensors", "fields": { "_id": "ObjectId", "sensor_id": "String", "type": "String", "location": { ...
wanna find out which sensors have the most frequent maintenance logs, right?
db.maintenance_logs.aggregate([ { $group: { _id: "$sensor_id", maintenanceCount: { $sum: 1 } } }, { $sort: { maintenanceCount: -1 } }, { $limit: 10 } ]);
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"smartcity_iot_db\", \"collections\": [{\"name\": \"sensors\", \"fields\": {\"_id\": \"ObjectId\", \"sensor_id\": \"String\", \"type\": \"String\", \"location\": {\"latitude\": \"Double\", \"longitude\": \"Double\", \"address\": ...
{ "database": { "name": "logistics_supply_chain_db", "collections": [ { "name": "shipments", "fields": { "_id": "ObjectId", "shipmentNumber": "String", "origin": { "warehouseId": "ObjectId", "address": "String", "departure...
find out the top 10 most shipped products by aggregating the shipment data.
db.shipments.aggregate([{ "$unwind": "$items" }, { "$group": { "_id": "$items.productId", "totalQuantity": { "$sum": "$items.quantity" } } }, { "$sort": { "totalQuantity": -1 } }, { "$limit": 10 }])
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"logistics_supply_chain_db\", \"collections\": [{\"name\": \"shipments\", \"fields\": {\"_id\": \"ObjectId\", \"shipmentNumber\": \"String\", \"origin\": {\"warehouseId\": \"ObjectId\", \"address\": \"String\", \"departureTime\":...
{ "database": { "name": "logistics_supply_chain_db", "collections": [ { "name": "shipments", "fields": { "_id": "ObjectId", "shipmentNumber": "String", "origin": { "warehouseId": "ObjectId", "address": "String", "departure...
calculate Average Shipment Duration
db.shipments.aggregate([ { "$match": { "destination.arrivalTime": { "$exists": true } } }, { "$project": { "duration": { "$subtract": ["$destination.arrivalTime", "$origin.departureTime"] } } }, { "$group": { "_id": null, "avgDuration": { "$avg": "$duration" } } } ])
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"logistics_supply_chain_db\", \"collections\": [{\"name\": \"shipments\", \"fields\": {\"_id\": \"ObjectId\", \"shipmentNumber\": \"String\", \"origin\": {\"warehouseId\": \"ObjectId\", \"address\": \"String\", \"departureTime\":...
{ "database": { "name": "genomic_analysis_healthcare_db", "collections": [ { "name": "patients", "fields": { "_id": "ObjectId", "patient_id": "String", "first_name": "String", ...
So, what are the most common actions that people do in the system?
db.audit_logs.aggregate([ { "$group": { "_id": "$action", "count": { "$sum": 1 } } }, { "$sort": { "count": -1 } } ])
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"genomic_analysis_healthcare_db\", \"collections\": [{\"name\": \"patients\", \"fields\": {\"_id\": \"ObjectId\", \"patient_id\": \"String\", \"first_name\": \"String\", \"last_name\": \"String\", \"gender\": \"String\", \"date_o...
{ "database": { "name": "social_sentiment_analysis_db", "collections": [ { "name": "social_posts", "fields": { "_id": "ObjectId", "post_id": "String", "platform": "String", "us...
Show me influencers with the most recent activity.
db.influencers.find().sort({ "last_active": -1 }).limit(10)
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"social_sentiment_analysis_db\", \"collections\": [{\"name\": \"social_posts\", \"fields\": {\"_id\": \"ObjectId\", \"post_id\": \"String\", \"platform\": \"String\", \"user\": {\"user_id\": \"String\", \"username\": \"String\", ...
{ "database": { "name": "social_sentiment_analysis_db", "collections": [ { "name": "social_posts", "fields": { "_id": "ObjectId", "post_id": "String", "platform": "String", "us...
how to track the average sentiment score trend by month and year for comments made by a specific influencer on a platform?
db.comments.aggregate([ { "$match": { "user.user_id": "<specific_user_id>" } }, { "$group": { "_id": { "year": { "$year": "$created_at_platform" }, "month": { "$month": "$created_at_platform" } }, "avg_sentiment": { "$avg": "$sentiment_score" } } }, { "$sort": { "_id.year": 1, "_id.month": 1 } } ])
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"social_sentiment_analysis_db\", \"collections\": [{\"name\": \"social_posts\", \"fields\": {\"_id\": \"ObjectId\", \"post_id\": \"String\", \"platform\": \"String\", \"user\": {\"user_id\": \"String\", \"username\": \"String\", ...
{ "database": { "name": "customer360_retail_db", "collections": [ { "name": "customers", "fields": { "_id": "ObjectId", "customer_id": "String", "first_name": "String", "last_n...
Find customers who have made only one purchase vs. those who have made multiple.
db.transactions.aggregate([ { $group: { _id: "$customer_id", purchase_count: { $sum: 1 } } }, { $group: { _id: { $cond: { if: { $eq: ["$purchase_count", 1] }, then: "One-Time Customers", else: "Repeat Customers" } }, count: { $sum: 1 } } } ])
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"customer360_retail_db\", \"collections\": [{\"name\": \"customers\", \"fields\": {\"_id\": \"ObjectId\", \"customer_id\": \"String\", \"first_name\": \"String\", \"last_name\": \"String\", \"email\": \"String\", \"phone\": \"Str...
{ "database": "RealTimeUserAnalytics", "collections": { "users": { "indexes": [ {"userId": 1, "unique": true}, {"email": 1, "unique": true} ], "schema": { "userId": "ObjectId", "email": "string", "username": "string", "firstName": "string", ...
Can you find out which top 10 products have been getting a lot of attention in the last 24 hours?
db.events.aggregate([ { $match: { timestamp: { $gte: new Date(Date.now() - 24 * 60 * 60 * 1000) } } }, { $group: { _id: "$productId", interactions: { $sum: 1 } } }, { $sort: { interactions: -1 } }, { $limit: 10 } ]);
[ { "from": "human", "value": "Here is mongodb schema {\"database\": \"RealTimeUserAnalytics\", \"collections\": {\"users\": {\"indexes\": [{\"userId\": 1, \"unique\": true}, {\"email\": 1, \"unique\": true}], \"schema\": {\"userId\": \"ObjectId\", \"email\": \"string\", \"username\": \"string\", \"firstName\...
{ "database": { "name": "customer360_retail_db", "collections": [ { "name": "customers", "fields": { "_id": "ObjectId", "customer_id": "String", "first_name": "String", "last_n...
Can you tell me which customer segment brings in the most money based on the transactions data?
db.transactions.aggregate([ { $lookup: { from: "customers", localField: "customer_id", foreignField: "customer_id", as: "customer" } }, { $unwind: "$customer" }, { $group: { _id: "$customer.customer_segment", total_revenue: { $sum: "$total_amount" } } }, {...
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"customer360_retail_db\", \"collections\": [{\"name\": \"customers\", \"fields\": {\"_id\": \"ObjectId\", \"customer_id\": \"String\", \"first_name\": \"String\", \"last_name\": \"String\", \"email\": \"String\", \"phone\": \"Str...
{ "database": { "name": "recommendation_system",{ "collections": [ { "name": "users", "fields": { "_id": "ObjectId", "name": "string", "email": "string", "password": "string", "preferences": { "genres": ["string"], "languages": ["string...
Could you tell me how many total interactions are there in the user interactions database?
db.user_interactions.countDocuments({})
[ { "from": "human", "value": "Here is mongodb schema and Could you tell me how many total interactions are there in the user interactions database?" }, { "from": "gpt", "value": "db.user_interactions.countDocuments({})" } ]
{ "database": { "name": "devops_log_event_db", "collections": [ { "name": "applications", "fields": { "_id": "ObjectId", "app_id": "String", "name": "String", "description": "S...
Hey, can you tell me how to find cloud resources that cost more than $1000 in a billing cycle?
db.cloud_resource_usage.find({ cost: { $gte: 1000 } }).sort({ billing_cycle: -1 });
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"devops_log_event_db\", \"collections\": [{\"name\": \"applications\", \"fields\": {\"_id\": \"ObjectId\", \"app_id\": \"String\", \"name\": \"String\", \"description\": \"String\", \"environment\": \"String\", \"owner\": \"Strin...
{ "database": "RealTimeUserAnalytics", "collections": { "users": { "indexes": [ {"userId": 1, "unique": true}, {"email": 1, "unique": true} ], "schema": { "userId": "ObjectId", "email": "string", "username": "string", "firstName": "string", ...
Can you show me where users are dropping off in the purchase process by counting the number of views, clicks, wishlists, and purchases for each user?
db.events.aggregate([ { $match: { eventType: { $in: ["view", "click", "wishlist", "purchase"] } } }, { $group: { _id: "$userId", views: { $sum: { $cond: [{ $eq: ["$eventType", "view"] }, 1, 0] } }, clicks: { $sum: { $cond: [{ $eq: ["$eventType", "click"] }, 1, 0] } }, ...
[ { "from": "human", "value": "Here is mongodb schema {\"database\": \"RealTimeUserAnalytics\", \"collections\": {\"users\": {\"indexes\": [{\"userId\": 1, \"unique\": true}, {\"email\": 1, \"unique\": true}], \"schema\": {\"userId\": \"ObjectId\", \"email\": \"string\", \"username\": \"string\", \"firstName\...
{ "database": { "name": "recommendation_system",{ "collections": [ { "name": "users", "fields": { "_id": "ObjectId", "name": "string", "email": "string", "password": "string", "preferences": { "genres": ["string"], "languages": ["string...
Can you please show me the top 5 most viewed content?
db.user_interactions.aggregate([{ $match: { interactionType: "view" } }, { $group: { _id: "$contentId", count: { $sum: 1 } } }, { $sort: { count: -1 } }, { $limit: 5 }])
[ { "from": "human", "value": "Here is mongodb schema and Can you please show me the top 5 most viewed content?" }, { "from": "gpt", "value": "db.user_interactions.aggregate([{$match: {interactionType: \"view\"}}, {$group: {_id: \"$contentId\", count: {$sum: 1}}}, {$sort: {count: -1}}, {$limit: ...
{ "database": { "name": "customer360_retail_db", "collections": [ { "name": "customers", "fields": { "_id": "ObjectId", "customer_id": "String", "first_name": "String", "last_n...
Find the conversion rate of customers targeted in a campaign.
db.marketing_campaigns.aggregate([ { $lookup: { from: "transactions", localField: "segment_targets", foreignField: "customer_id", as: "purchases" } }, { $project: { name: 1, conversion_rate: { $divide: [{ $size: "$purchases" }, { $size: "$segment_targets" }]...
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"customer360_retail_db\", \"collections\": [{\"name\": \"customers\", \"fields\": {\"_id\": \"ObjectId\", \"customer_id\": \"String\", \"first_name\": \"String\", \"last_name\": \"String\", \"email\": \"String\", \"phone\": \"Str...
{ "database": { "name": "devops_log_event_db", "collections": [ { "name": "applications", "fields": { "_id": "ObjectId", "app_id": "String", "name": "String", "description": "S...
Finds all anomalies where the anomaly score is above 0.8.
db.anomaly_detection_results.find({ anomaly_score: { $gte: 0.8 } }).sort({ timestamp: -1 });
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"devops_log_event_db\", \"collections\": [{\"name\": \"applications\", \"fields\": {\"_id\": \"ObjectId\", \"app_id\": \"String\", \"name\": \"String\", \"description\": \"String\", \"environment\": \"String\", \"owner\": \"Strin...
{ "database": { "name": "logistics_supply_chain_db", "collections": [ { "name": "shipments", "fields": { "_id": "ObjectId", "shipmentNumber": "String", "origin": { "warehouseId": "ObjectId", "address": "String", "departure...
Can you determine which five vehicles have been used the most often, along with how many times each one has been used?
db.vehicles.aggregate([{ "$lookup": { "from": "shipments", "localField": "_id", "foreignField": "assignedVehicleId", "as": "shipments" } }, { "$project": { "vehicleNumber": 1, "shipmentCount": { "$size": "$shipments" } } }, { "$sort": { "shipmentCount": -1 } }, { "$limit": 5 }])
[ { "from": "human", "value": "Here is mongodb schema {\"database\": {\"name\": \"logistics_supply_chain_db\", \"collections\": [{\"name\": \"shipments\", \"fields\": {\"_id\": \"ObjectId\", \"shipmentNumber\": \"String\", \"origin\": {\"warehouseId\": \"ObjectId\", \"address\": \"String\", \"departureTime\":...
{ "database": "RealTimeUserAnalytics", "collections": { "users": { "indexes": [ {"userId": 1, "unique": true}, {"email": 1, "unique": true} ], "schema": { "userId": "ObjectId", "email": "string", "username": "string", "firstName": "string", ...
Can you please identify the top-performing products by counting the number of views, clicks, and purchases for each product in the database?
db.events.aggregate([ { $group: { _id: "$productId", views: { $sum: { $cond: [{ $eq: ["$eventType", "view"] }, 1, 0] } }, clicks: { $sum: { $cond: [{ $eq: ["$eventType", "click"] }, 1, 0] } }, purchases: { $sum: { $cond: [{ $eq: ["$eventType", "purchase"] }, 1, 0] }...
[ { "from": "human", "value": "Here is mongodb schema {\"database\": \"RealTimeUserAnalytics\", \"collections\": {\"users\": {\"indexes\": [{\"userId\": 1, \"unique\": true}, {\"email\": 1, \"unique\": true}], \"schema\": {\"userId\": \"ObjectId\", \"email\": \"string\", \"username\": \"string\", \"firstName\...
{ "database": { "name": "recommendation_system",{ "collections": [ { "name": "users", "fields": { "_id": "ObjectId", "name": "string", "email": "string", "password": "string", "preferences": { "genres": ["string"], "languages": ["string...
find out the total number of documents stored in the 'users' collection in database?
db.users.countDocuments({})
[ { "from": "human", "value": "Here is mongodb schema and find out the total number of documents stored in the 'users' collection in database?" }, { "from": "gpt", "value": "db.users.countDocuments({})" } ]
{ "database": { "name": "stock_market_db",{ "collections": [ { "name": "stocks", "fields": { "_id": "ObjectId", "ticker": "string", "companyName": "string", "sector": "string", "industry": "string", "market": "string", "createdAt": "date", ...
Can you find the daily percentage change in price for a specific stock, where we have each record of the stock's open and close prices sorted by date?
db.price_history.aggregate([{ $match: { stockId: ObjectId("STOCK_ID") } }, { $sort: { date: 1 } }, { $group: { _id: "$date", priceChange: { $subtract: ["$close", "$open"] } } }])
[ { "from": "human", "value": "Here is mongodb schema and Can you find the daily percentage change in price for a specific stock, where we have each record of the stock's open and close prices sorted by date?" }, { "from": "gpt", "value": "db.price_history.aggregate([{$match: {stockId: ObjectId(...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
10