title: How to compare two arrays in Standard SQL (BigQuery)?
body: <p>I have two tables with the exact same schema, one of the fields is a record and I try to compare this field between the two tables.</p>
  <p>For example:</p>
  <p>Table A:</p>
  <pre><code>{ Name: 'Mary',
    DOB: '06.06.1970',
    Children:[
              { Name: John,   Age: 6 },
              { Name: Agatha, Age: 10}
             ]
  },
  { Name: 'Bob',
    DOB: '30.03.1982',
    Children:[
              { Name: Anthony, Age: 9 },
              { Name: William, Age: 4 },
              { Name: Rose,    Age: 2 }
             ]
  },
  { Name: 'Adam',
        DOB: '312.10.1980',
        Children:[
                  { Name: Andrew, Age: 9 },
                  { Name: Kate, Age: 4 }
                 ]
      }
  </code></pre>
  <p>Table B:</p>
  <pre><code>{ Name: 'Mary',
        DOB: '06.06.1970',
        Children:[
                  { Name: John,   Age: 6 },
                  { Name: Agatha, Age: 10}
                 ]
      },
      { Name: 'Bob',
        DOB: '30.03.1982',
        Children:[
                  { Name: Anthony, Age: 9 },
                  { Name: George,  Age: 4 },
                  { Name: Frank,   Age: 2 }
                 ]
      },
      { Name: 'Adam',
        DOB: '312.10.1980',
        Children:[
                  { Name: Andrew, Age: 9 },
                  { Name: Kate, Age: 4 },
                  { Name: Jonathan,    Age: 2 }
                 ]
      }
  </code></pre>
  <p>The output I'd like to get is:</p>
  <pre><code>Name    
  ----------
  Bob     
  Adam    
  </code></pre>
  <p>Since the Children details are not the same for Bob or Adam in table A and table B (whenever it's the size of the record (num of children) or the details (children names etc...))</p>
  <p>I tried to use <code>SELECT UNION DISTINCT</code> but it doesn't work on an array, I also tried <code>!=</code> and <code>&lt;&gt;</code> but it doesn't work on arrays...
  It would be ideal to compare two arrays like you can compare two lists in Python (comparing the structure and the content).</p>
  <p>Is there a way to implement something similar ?</p>
  <p>Thank you</p>