summaryrefslogtreecommitdiff
path: root/tests/window.ur
blob: fd93679c20f8c22672bdf583f59726df50b25f50 (plain)
1
2
3
4
5
6
7
8
9
10
11
table empsalary : { Depname : string,
                   Empno : int,
                   Salary : int }

fun main () : transaction page =
    x <- queryX (SELECT empsalary.Depname, empsalary.Empno, empsalary.Salary, RANK() AS R
                 FROM empsalary)
                (fn r => <xml>{[r.Empsalary.Depname]}, {[r.Empsalary.Empno]}, {[r.Empsalary.Salary]}, {[r.R]}<br/></xml>);
    return <xml><body>
      {x}
    </body></xml>