SQL-like select - what operations can be performed on result table

I use tigergraph version 3.1.
I have an SQL-like select in my code:

SELECT p1.name,p1.category, count(p2) as p2_cnt INTO ResTable
FROM vertex1:p1-()-vertex2:p2 ;

I tried to perform something like with VertexSet or container types but nothing is allowed.

  1. to print only some of fields
    PRINT ResTable.name;
    PRINT ResTable[ResTable.name];
  2. Use as a source in next select
    SELECT pcn
    FROM ResTable:pcn;
  3. Iterate in a loop
    FOREACH a_res in ResTable DO
    PRINT a_res ;
    END;
  4. Find the number of rows
    ResTable.size()
  5. Calculate some measures based on table
    PRINT avg(ResTable.p2_cnt)

What can I do with tabular output except PRINT?
Thank you

currently, print T is the main use. We are working on to provide more use of it.

Thank you.
This is really a promising feature - SQL-like expressions, so that new functionality would be extremely useful.

Fully agree. Please stay tuned.

1 Like