Hello all,
I would like to implement the following query in IGNITION and am encountering problems.
Using the following query I get data sorted as follows and stored in the tag RAW_DATA as dataset.
"SELECT ORDERNR, PIECES, DURATION, StartDate&Time, EndDate&Time
FROM DATABASE"
Dataset:
ORDERNR | PIECES | DURATION | StartTDate| StartTime EndDate&Time
0101 | 0 | 100 | 20230630 | 063000 | 20230630 | 083000 |
0101 | 10 | 250 | 20230630 | 103000 | 20230630 | 123000 |
0101 | 5 | 150 | 20230631 | 093000 | 20230631 | 103000 |
0102 | 20 | 200 | 20230630 | 063000 | 20230630 | 083000 |
I would like to summarize the data in an EXPRESSION function as follows.
Count all PIECES & DURATION with the same ORDERNR together.
Filter earliest StartTime and StartTime & latest EndDate EndTime of an ORDERNR.
The summarized output should then be as follows.
ORDERNR, PIECES, DURATION, StartDate, StartTime, EndDate, EndTime
0101 | 15 | 500 | 20230630 | 063000 | 20230631 | 103000 |
0102 | 20 | 200 | 20230630 | 063000 | 20230630 | 083000 |
With my approach I get unfortunately all the time an error message.
Could someone help me?