How to generate reports using NoSQL?

11

I have a Message document and in my NoSQL database I can have thousands of messages as follows:

[{"origem":1,"destinatario":1,"created_at":"2016-12-20","conteudo":"P ligula pellentesque ultrices"},
{"origem":1,"destinatario":2,"created_at":"2016-12-21","content":"Vestibulum ante ipsum ."},
{"origem":1,"destinatario":3,"created_at":"2016-12-20","content":"Aliquam sit amet diam in ."},
{"origem":1,"destinatario":3,"created_at":"2016-11-20","content":"Aliquam sit amet diam in ."},
{"origem":1,"destinatario":4,"created_at":"2016-10-20","content":"Aliquam sit amet diam in ."}]

I have a question to generate reports for example: Number of messages sent in month 12, Number of new recipients in month 11.

Amount of messages in the month is easy Just scroll through all the messages and compare if it is a certain month and I am counting, but to check the amount of new recipients in month 12 I have to go through all the messages and check if the recipient is in previous messages etc. This is something that would take a lot since I can have multiple recipients and thousands of messages.

I do not want them to do it for me, but I think there's someone else in Nosql who can give a hint of some tool that manages this more easily or otherwise model my bank using a relational database.     

asked by anonymous 27.12.2016 / 02:19

0 answers