I have an excel like table with a should
value and an is
value for each day of a month:
descrip. | | 01 | 02 | 03 | 04 |
_______________________________________
column 1 | should | 60 | 0 | 60 | 0 |
| is | 60 | 0 | 60 | 60 |
_______________________________________
column 2 | should | 0 | 15 | 0 | 15 |
column 3 | is | 0 | 0 | 0 | 15 |
I need the values of this table for two purposes:
- Extract some statistics (total; should / is ratio; etc)
- Based on the values see if the actions (entry in column) are done
- Just once
- Once every week
- daily
- periodically
Should I get the statistics with SQL queries or calculate them with JavaScript based on the JSON response? What are the (dis)advantages
Some additional information:
I'm using SpringBoot with JPA and a PostgreSQL database.
Tables:
- Chart
- Column
- Action (should / is values)
Here is a part of my JSON response:
"columns": [{
"id": 12,
"should": [{
"id": 13,
"date": 1438552800000,
"min": 60
}],
"is": []
}
}]