modified pipeline

This commit is contained in:
Sam 2024-09-26 10:02:29 +01:00
parent eb3d17884a
commit 537cfdee1b
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ def bitcoin_business_growth_timeseries(query):
pipeline = [ pipeline = [
{ {
"$match": { "$match": {
"days_ago": {"$lte": int( query["days_ago"] )}, "days_ago": {"$lte": int(query["days_ago"])},
"country_name": query["country_name"], "country_name": query["country_name"],
} }
}, },
@ -51,7 +51,7 @@ def bitcoin_business_growth_timeseries(query):
def bitcoin_business_growth_percent_diff_days_ago(query): def bitcoin_business_growth_percent_diff_days_ago(query):
pipeline = [ pipeline = [
{"$match": {"days_ago": {"$lte": int( query["days_ago"] )}}}, {"$match": {"days_ago": {"$lte": int(query["days_ago"])}}},
{"$sort": {"country_name": 1, "days_ago": 1}}, {"$sort": {"country_name": 1, "days_ago": 1}},
{ {
"$group": { "$group": {