graph views

half of the sql for graph procs