Skip to content

Instantly share code, notes, and snippets.

@youngnh
Created November 30, 2012 18:45
Show Gist options
  • Save youngnh/4177670 to your computer and use it in GitHub Desktop.
Save youngnh/4177670 to your computer and use it in GitHub Desktop.
Starting Plan
(query+ (frame+ {:column-metadata {"x" {:datatype :uri
:expression :one-to-one}}
:alias "topframe__1"
:source "topframe"}
(distinct+)
(project+ [x id])
(bind+ {x (new-function
{:op "iri"
:args [(new-function
{:op "http://www.w3.org/2005/xpath-functions#concat"
:args ["http://www.knoodl.com/ui/groups/DIMHRS/vocab/Human_Resources/"
(new-variable
{:name "class_map_context__1/MAXEMPLID"})]})]})
id (new-variable
{:name "class_map_context__1/MAXEMPLID"})}))
(criteria+ (new-function
{:op "is-not-null"
:args [(new-variable
{:name "class_map_context__1/MAXEMPLID"})]})
(query+ (frame+ {:alias "class_map_context__1"
:source "class_map_context"}
(project+ [MAXEMPLID])
(group+ []
{MAXEMPLID (new-aggregate-function
{:aggregate-op :max
:expression (new-variable
{:name "PS_JOB/EMPLID"})})}))
(source+
{:table "PS_JOB"
:alias nil
:table-ref (java.net.URI. "http://db/Table/PS_JOB")}))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment