Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

SQL Challenge - Time Series Problem

$
0
0

Hi Experts,

We are facing a complex time series related problem in our project and could not find the solution after several days of discussion.

 

Hope someone here could give a hint or clue to solve this issue.

 

The scenario:

 

The is a table TABLE1, which contains Line/Machine's run time information.

 

For example

RUN_IDNODE_IDShiftSTART_DATESTART_TIME

START_

TIMESTAMP

END_DATEEND_TIME

END_

TIMESTAMP

GROSS_DURATION_

IN_MINUTE

101Line-1MRNG2014-07-0108:10:002014-07-01 08:10:002014-07-0110:00:002014-07-01 10:00:00

110

 

 

There is another table Table 2,  which contains the Loss Durations.

 

ENTRY_IDNODE_IDSTART_DATESTART_TIMESTART_TIMESTAMPEND_DATEEND_TIMEEND_TIMESTAMPLOSS_DURATION_IN_MNT
1002Mc-1 Under Line-12014-07-0107:00:002014-07-01 07:00:002014-07-0108:30:002014-07-01 08:30:0090
1003Mc-1 Under Line-12014-07-0108:40:002014-07-01 08:40:002014-07-0109:30:002014-07-01 09:30:0090

 

 

Our job is to find out the LossDuration and GrossDuration.

 

I have the complete problem in excel and provided the queries in attached files.

 

 

We are trying to achieve this in calculation view but could not find after several tries. Any help would be appreciated.

 

PS: The scenario is quite complex to describe in words, but I have tried my best in the excel file. Please let me know if you need further explanation.

 

 

Regards,

Raja


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>