How can I check if two arrays have any common elements in Databricks SQL?
You can use the `arrays_overlap` function to check if two arrays have any common elements in Databricks SQL. This function returns true if the intersection of array1 and array2 is not empty. Here's an example:

```sql
SELECT arrays_overlap(array(1, 2, 3), array(3, 4, 5));
```

In this example, the function returns true because the arrays have the common element 3. If the arrays have no common non-null element, they are both non-empty, and either of them contains a null element, the function returns NULL. Otherwise, it returns false.