Change Password

Input error
Input error
Input error
Submit

Change Nickname

Current Nickname:
Submit
Search
v4.0
    v4.0

    UNION | Union & Deduplicate (V4.1)

     V4.1 

    Format, Parameters

    UNION splices two data columns head-to-tail and generate one column, and deduplicate this new column before passing to the next statement. The final column has a length equal to or less then the sum of lengths of the input columns.

    Syntax:

    • Format:
      ... return <columnA1> as <alias1>, <columnA2> as <alias2>, ...
      union
      ... return <columnB1> as <alias1>, <columnB2> as <alias2>, ...
    • Parameters: see table below
    • Affected columns: <columnA>, <columnB>
    Name Category Specification Description
    <columnA> NODE,EDGE,PATH,ATTR,ARRAY,TABLE / The first UQL statement's returned result
    <columnB> NODE,EDGE,PATH,ATTR,ARRAY,TABLE / The first UQL statement's returned result, which requires to have the same number of returned result, alias, and category with the same alias
    <alias> string With the same naming convention as custome alias The alias of returned valus, the aliases from two UQL statements' returned results must be the same, order of which does not need to be mapped

    Analysis

    find().nodes([3,4,5]) as n1
    return n1 as a1, n1.color as a2
    union
    find().nodes([4,7]) as n1
    return n1 as a1, n1.color as a2
    

    Each of the two UQL statements above has one returned column for NODE and ATTR repectively, connected and deduplicated by UNION.

    Common Usage

    Example: find cards that transfered to Card CA029 with an amount higher than 1000, and cards that transfered to Card CA022 with an amount higher than 3000, return results after deduplication

    n({_id == "CA029"}).le({@transfer.amount > 1000}).n({@card} as n) return n
    union
    n({_id == "CA022"}).le({@transfer.amount > 3000}).n({@card} as n) return n
    
    Please complete the following information to download this book
    *
    公司名称不能为空
    *
    公司邮箱必须填写
    *
    你的名字必须填写
    *
    你的电话必须填写
    *
    你的电话必须填写