title: How to use IFNULL() in BigQuery - Standard SQL?
body: <p>I would like to know how to use the IFNULL() BigQuery Standard SQL function properly.  This is my current data structure. The columns named "key" and "stringColumn" store strings.  Meanwhile, the column named "integerColumn" stores integers:</p>
  
  <p><a href="https://i.stack.imgur.com/rYkii.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rYkii.png" alt="enter image description here"></a></p>
  
  <p>I would like to create a new column named "singleValueColumn" that takes the value of the "stringColumn" or "integerColumn" that is not null:</p>
  
  <p><a href="https://i.stack.imgur.com/Zatg7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Zatg7.png" alt="enter image description here"></a></p>
  
  <p>This is my BigQuery Standard SQL query:</p>
  
  <pre><code>SELECT  key,
          value.string_value as stringColumn,
          value.int_value as integerColumn,
          IFNULL(value.string_value, value.int_value) as singleValueColumn
  
  FROM `com_skytracking_ANDROID.app_events_*`, 
        UNNEST(event_dim) as event,
        UNNEST(event.params) as event_param
  
  WHERE event.name = "order_event"
  </code></pre>
  
  <p>However, when I run the query I am getting this error:</p>
  
  <pre><code>Error: No matching signature for function IFNULL for argument types: STRING, INT64. Supported signature: IFNULL(ANY, ANY) at [4:9]
  </code></pre>
  
  <p>Thanks for your help.</p>