// mongoDB query for config6.json // Note: you are responsible for looking up all two-letter codes // that do not belong to a US state or Washington, DC. // Note: we assume the query is run on May 5.You will insert the appropriate // date dynamically. db.covid.aggregate( {$match: {state: {$nin: ["AS", "GM", ...]}}}, {$match: {date: 20200505}}, {$group: {_id:1, sPositive: {$sum: "$positive"} } }, {$project: {_id:0, totalPositive: "$sPositive"}} // the prpject operation is purely cosmetic ) // The output table shall look as follows // // // //
May 5, 2020
Positive cases $totalPositive