Re: windown function count Unexpected results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, May 4, 2017, winston cheung <winston_cheung@xxxxxxx> wrote:
, why the value of each line are different?

 window w as (partition by department_id order by salary desc);


This isn't an admin question; general or novice would be a better mailing list.

The answer is you added an order by clause to your window definition.  The docs explain why doing that results in each row of the partition only summing the rows before and including the current row.

David J. 

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux