Questions tagged [nosql-aggregation]

Questions related to Aggregation functions in NoSQL databases.

Questions related to Aggregation functions such as Count() or Sum() in NoSQL databases.

313 questions
0
votes
0 answers

Aggregate by child/parent data on nested documents ElasticSearch

How can I query a nested document and group by a child and a parent data, with nested documents: I'm querying this way to obtain the sum per brand and year, but I want to get the sum by year and brand, all I try returns wrong…
Raphael
  • 99
  • 10
0
votes
1 answer

From PostgreSQL to Cassandra - Aggregation functions not supported

I need your advise please. I have an application that runs on PostgreSQL but takes too long to bring back data. I would like to use Cassandra but noticed that CQL does not support aggregation. Would that be possible with Hadoop or am I going…
Steve
  • 1,028
  • 7
  • 25
  • 42
0
votes
1 answer

Datastore for aggregations

What is a preferred datastore for fast aggregating of data? I have data that I pull from other systems regularly, and the data store should support queries like: What is the number of transactions done by a user in a time range. What is the total…
Abhiram
  • 333
  • 1
  • 4
  • 11
0
votes
0 answers

Grouping of data based on week using apache spark

I am new bee to spark, I have around 15 TB data in mongo ApplicationName Name IPCategory Success Fail CreatedDate abc a.com cd 3 1 25-12-2015 00:00:00 def d.com ty 2 …
0
votes
1 answer

MAX() SQL Equivalent on Redis

I'm new on Redis, and now I have problem to improve my stat application. The current SQL to generate the statistic is here: SELECT MIN(created_at), MAX(created_at) FROM table ORDER BY id DESC limit 10000 It will return MIN and MAX value from…
Dolly Aswin
  • 2,684
  • 1
  • 20
  • 23
0
votes
1 answer

Scaling-window ratings in Redis

I use awesome Redis sorted sets to score users and, then, quickly get user rating by score. Also, my score has "weight", so that one score can give 5 points to user, and another vote can give 2 points, etc. Now if somebody votes for user, I call…
Dzmitry Bahdanovich
  • 1,735
  • 2
  • 17
  • 34
0
votes
0 answers

One to Many Schema Design in MongoDB: Can I avoid cross embedding and true linking?

I am working on an e-commerc site for T-Shirts. There are 8 variations of T-Shirts, all of which are part of an "Edition" (or clothing line). I want to be able to always display all of the shirts which are a part of the edition, but be able to…
Startec
  • 12,496
  • 23
  • 93
  • 160
0
votes
2 answers

Cassandra column family for multiple usecases good/bad

I have a data structure to store different areas/locations, area is part of a city, city is part of a state, state is part of country. couple of usecases to query are U1 : Given a location get city, state, country. U2 : Given a Country, State get…
0
votes
1 answer

Elasticsearch - Include in facet if array contains elements

I'm trying to find out if it's possible to facet/aggregate on a field, if that field (which is an array) contains 1 or more records. For example - Let's say I have 3 documents in my index, all under the "user" type. { "id": 1, "name":…
0
votes
3 answers

Mongodb: find documents with array where all elements exist in query array, but document array can be smaller

I have a Collection in my database where most documents have an array-field. These arrays contain exactly 2 elements. Now i want to find all documents where all of those array elements are elements of my query array. Example Documents: { a:["1","2"]…
Zulway
  • 13
  • 4
0
votes
1 answer

Column oriented database related

Folks, I am currently have started reading about NOSQL related DB as currently working on Database warehousing related application. I have following questions. I have already read basics. Question 1) How entire raw is retrived in column oriented…
user1927808
  • 577
  • 1
  • 10
  • 23
0
votes
1 answer

How I can merge sub-document (as array) on mongodb collection

Hello I have a collection: { "_id" : ObjectId("508d27069cc1ae293b36928d"), "title" : "This is the title", "body" : "This is the body text.", "created_date" : ISODate("2012-10-28T12:41:39.110Z"), "comments" : [ { …
Dmitry
  • 816
  • 1
  • 9
  • 17
0
votes
1 answer

How can i get $sum for array in document?

For example, i have following document: { "_id" : ObjectId("52ffddd3c69e40174c046d67"), "works" : [ { "service_id" : ObjectId("52ffd576c69e40174c046d64"), "price" : 150, "count" : 3, …
0
votes
2 answers

How to group by count in morphia?

I have a collection: public class Message { @Id ObjectId id; String group; } I need to count number of messages per each group. Is it possible to avoid iterating through entire collection?
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
0
votes
1 answer

RavenDB : Child collection intersections

I'm new to RavenDB and I have a Raven DB document: Student { Id : int Subjects : List } I'm trying to write a query to get a intersection of the subjects of student with id 1 and student with id 2 { ID : 1 Subjects : {22, 23,…
1 2 3
20
21