comparison tests/window.ur @ 1776:8f28c3295148

Compiled a window function use
author Adam Chlipala <adam@chlipala.net>
date Sat, 02 Jun 2012 16:00:50 -0400
parents
children 59b07fdae1ff
comparison
equal deleted inserted replaced
1775:6bc2a8cb3a67 1776:8f28c3295148
1 table empsalary : { Depname : string,
2 Empno : int,
3 Salary : int }
4
5 fun main () : transaction page =
6 x <- queryX (SELECT empsalary.Depname, empsalary.Empno, empsalary.Salary, RANK() AS R
7 FROM empsalary)
8 (fn r => <xml>{[r.Empsalary.Depname]}, {[r.Empsalary.Empno]}, {[r.Empsalary.Salary]}, {[r.R]}<br/></xml>);
9 return <xml><body>
10 {x}
11 </body></xml>