1

私は例でbigqueryを学んでいます:personsData https://developers.google.com/bigquery/docs/data#nested

この例では、と呼ばれる繰り返しファイルがありchildrenます。これは、「ジョシュ」と呼ばれる子供と「ジム」と呼ばれる子供を持っている人を見つけるためのクエリを作成することは可能ですか?

次のクエリを試しましたが、結果が返されませんでした。 select fullName from [xxx.xx] where children.name = "Jane" and children.name = "John"

4

1 に答える 1

2

A couple of things are wrong with the above query.

  1. There should be an or not an and between the two criteria. e.g. children.name = "Josh" or children.name = "Jim"
  2. If you are using the standard google data set then there is no children with the name "Josh" or "Jim"

try:

select fullName from PersonsData.personsdata  where children.name = "Jane" or children.name = "John"

with google datasets

于 2013-03-04T00:05:55.657 に答える