0

BigQuery ドキュメントに記載されているようなスキーマがあるとします。

Last modified                 Schema                 Total Rows   Total Bytes   Expiration
 ----------------- ----------------------------------- ------------ ------------- ------------
  27 Sep 10:01:06   |- kind: string                     4            794
                    |- fullName: string (required)
                    |- age: integer
                    |- gender: string
                    +- phoneNumber: record
                    |  |- areaCode: integer
                    |  |- number: integer
                    +- children: record (repeated)
                    |  |- name: string
                    |  |- gender: string
                    |  |- age: integer
                    +- citiesLived: record (repeated)
                    |  |- place: string
                    |  +- yearsLived: integer (repeated)

fullNames があると仮定します: John、josh、harry

住んだ都市:ニューヨーク、シカゴ、シアトル

条件を使用して、citylived と count を反復処理するにはどうすればよいですか。たとえば、fullName = John で、citysLived.place = newyork とcitysLived.place = chicago の両方に住んでいて、citysLived.place = seattle には住んでいないユーザーの数を数えたいと思います。

ありがとう、ジョン

4

1 に答える 1