on 06-27-2017 7:40 PM
Hello,
Please help me with some advice.
This is my scenario. I have a table with the next relevant fields:
| GUID | NodeID | RegisterDate | ProcessingDate | value1 | value2 |
-------------------------------------------------------------------
| 1 | 1 | 2017.01.01 | 2017.01.09 | 10 | 20 |
| 2 | 1 | 2017.01.02 | 2017.01.09 | 10 | 30 |
| 3 | 2 | 2017.01.02 | 2017.01.10 | 10 | 40 |
| 4 | 2 | 2017.01.02 | 2017.01.11 | 10 | 40 |
...
What I need is something like this:
select * from...
where ProcessingDate = 'inputParameter(date)' and max(RegisterDate)
group by NodeID
and the expected result should be:
| GUID | NodeID | RegisterDate | ProcessingDate | value1 | value2 |
-------------------------------------------------------------------
| 2 | 1 | 2017.01.02 | 2017.01.09 | 10 | 30 |
| 4 | 2 | 2017.01.02 | 2017.01.11 | 10 | 40 |
So, is there a possibility to achieve this scenario using Agregation/Projection nodes in graphical calculation view or the best solution is SQL Script?
I found a solution using Rank Node, but the performance is slow.
Thanks for your attention.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.