Home > database >  [discussion post] number of Oracle warehouse building index
[discussion post] number of Oracle warehouse building index

Time:09-22

To calculate similar to nearly N days website orders , the data as follows (a simply list the dimensions) :


When the data condition, is not statistics on July 2, A1, B1, C1 dimensions corresponding close orders index N web, but in fact A1, B1, C1 dimensions should be to have data,
Ask god to some thoughts

CodePudding user response:

Didn't understand this is what to do,

CodePudding user response:

For example, a fruit shop, selling apples and pears on the first day the 100 kg, only sell the apple 50 kg, and the next day... , then I now 7 days before the statistics of sales, the first day of the statistical result is 100 kg, apples and pears each statistics when the next day, became the apple of 150 kg, and pear is not counted, in fact, sales in the 7 days before the index on the pear should be 100 kg,
The original write is to use the sum () over (partition by.. Oder by.. The range) method and find the missing dimension data will appear the ~

CodePudding user response:

You keep to the dimension of the statistical separate table, using this form to do outside connection is ok
  • Related