25.Left outer JOINs 左外连接

默认的连接是一个内部连接(INNER join)。这意味着,对于每个加入对象,左边和右边源对象必须non-missing和non-null。

Query:

SELECT usr.personal_details, orders
    FROM users_with_orders usr 
        USE KEYS "Tamekia_13483660" 
            LEFT JOIN orders_with_users orders 
                ON KEYS ARRAY s.order_id FOR s IN usr.shipped_order_history END

结果:

{
  "results": [
    {
      "personal_details": {
        "age": 39,
        "display_name": "Tamekia Akin",
        "email": "Tamekia.Akin@snailmail.com",
        "first_name": "Tamekia",
        "last_name": "Akin",
        "state": "Massachusetts"
      }
    }
  ]
}

Last updated

Was this helpful?