Category "aggregation"

How to project only the fields present in an array in MongoDB?

there is a document schema that has an array field called "updatedFields" which contains some fields names that you will find in "oldDocument" and "newDocument"

Django aggregation Many To Many into list of dict

It's been hours since I tried to perform this operation but I couldn't figure it out. Let's say I have a Django project with two classes like these: from django

Order of aggregation with generalization and specialization

I came across this problem/question when designing a DCD. I have a generalization products and 2 specializations milk and pizza. I have doubts about if should u

wrong result when applying aggregation function on series with * and where clause

There is an error with the result of aggregation on series with * and where clause.The value of count(root.ln.wf02.wt02.temperature) should be 21 but it turned

Get count distinct by nested objects from Elasticsearch

I have index with following mapping { "mappings": { "properties": { "typed_obj": { "type": "nested", "pr

R's ceiling_date equivalent in SQL

I want to implement R's ceiling_date fucntion in SQL (Postgresql). So I have dates in a column for everyday with corresponding sales and I want to accumulate th

How to get decrypted values in the aggregation result by the using of getter and setter in node.js

var mongoose = require("mongoose"); const Schema = mongoose.Schema; let CryptoJS = require("crypto-js"); function encrypt(text) { try { let ciphertext =

Query against a materialized view with uniqExact column fails due to memory limit

I have a materialized view with the following structure: CREATE MATERIALIZED VIEW events_daily ENGINE = AggregatingMergeTree() ORDER BY ( owner_

UML Aggregation Multiplicity

What do the diagram's multiplicity values mean? Do they mean each ShoeStore must have 1 instance of NikeShoes, and that the same instance can be part of many S

How to create nested array inside $group in MongoDB?

After some of the aggregation pipeline stages, my MongoDB Document has the following format: { "key": "A", "status": "To Do", "val": 4 }, {

lookup on all documents inside an array - MongoDB aggregation

I need to execute a lookup stage on all documents inside an array. The collection: { { "name": "test", "age": 2, "replies": [ {

How to add "allowDiskUse" in @Aggregation annotation in repository in Spring Boot?

I have an aggregation written in a MyRepository.kt file which is being called from MongoDataRetriever.kt file in the backend. MyRepository.kt file: import org.s

MongoDB $lookup with conditional foreignField

Playground: https://mongoplayground.net/p/OxMnsCFZpmQ My MongoDB version: 4.2. I have a collection car_parts and customers. As the name suggests car_parts has c

Elasticsearch : aggregation "existing" fields

I'm quite new to ElasticSearch aggregations. I want to be able to count how many documents are retrieved with a not null field. Here's what I do to count how m

Power BI Grouping

Location Won Lost Home 3 4 Home 2 3 Home 5 4 Home 4 6 Away 3 4 Away 2 3 Away 5 4 Away 4 6 This is an example table that I have in Power BI. I am trying to cre