Archives of the TeradataForum
Message Posted: Sat, 23 Jan 2010 @ 23:46:22 GMT
Subj: | | Re: Workaround to avoid product join |
|
From: | | Victor Sokovin |
| It's not lost, the cumulative sum takes care of that, it carries the previous value over to that minute. | |
I agree with this but I thought that the "missing" minute should also contribute to the usage for all sessions alive during that minute, not
just copy the usage from previous minutes.
Don't understand how the SUM (or double SUM) can handle this if it gets cnt=0 for all "missing" minutes. Perhaps some extra COUNT is still
necessary?
Again, "missing" minute is the one which can only come from the last query in the UNION. It does not occur in A.
Suggest we wait until the OP gets back to the discussion and confirms.
Victor
|