On Mon, Aug 25, 2014 at 4:20 PM, forkandwait <webb.spra...@gmail.com> wrote:

>
> I would be interested to hear what parts of the full window function spec
> are not covered by the example, if someone can describe it easily.
>


SELECT
  employee_name,
  employee_id,
  salary,
  rank() OVER(PARTITION BY dept ORDER BY salary DESC),
  100.0*salary/sum(salary) OVER (PARTITION BY dept)
FROM employee;

I don't know if the above is valid SQL or not.  But is seems like something
somebody might like to do.  And it also seems hard to implement.  Note that
the rank() function works very different from the sum() function, even
though they have similar syntax.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to