Kategorien
business

Metabase ausprobiert

ein bissl eine Qual erst mit mongodb aber dann gehts

 
[
{“$match”: { “events.Event”: “ACCOUNT_REGISTER_SHOW”} }
,
{$project: {
shapeys: {$filter: {
input: “$events”,
as: “event”,
cond: {$eq: [“$$event.Event”, “ACCOUNT_REGISTER_SHOW”]}
}},
_id: 1

}}
,{$unwind: ‘$shapeys’}
{“$project”:
{“created~~~day”:
{“$let”:
{“vars”:
{“column”:”$created”},
“in”:{“date”:{“$dateToString”:{“format”:”%Y-%m-%d”,”date”:”$shapeys.Timestamp”}}}
}
}
}
},

{“$project”:{“_id”:”$_id”,”___group”:{“created~~~day”:”$created~~~day”}}},

{“$group”:
{“_id”:”$___group”,”count”:{“$sum”:1}}

},
{“$sort”:{“_id”:1}},

{“$project”:{“_id”:false,”Date”:{“$toDate”:”$_id.created~~~day.date”},”count”:true}},
]

metabase1