becustom
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home4/joyplace/public_html/wp-includes/functions.php on line 6114wordpress-seo
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home4/joyplace/public_html/wp-includes/functions.php on line 6114LATERAL VIEW and EXPLODE are 2 different things in Hive. <\/span>Lateral view is used in conjunction with user-defined table generating functions such as <\/span>explode()<\/span>.\u00a0<\/span><\/p>\n Let\u2019s say we have an employee table with employee name and an Array of department ids the employee belongs to.<\/span><\/p>\n \u00a0select * from employee;<\/span><\/p>\n With the data above we would like to count the number of departments the employee belongs to. The output should look like below.<\/span><\/p>\n This is an easy problem to solve if the data we have is not nested. But with our data the dept_list is an Array of integers providing the list of departments the employee belongs to.<\/span><\/p>\nProblem<\/span><\/h2>\n
+-----------------+---------------------+--+\n| employee.ename\u00a0 | employee.dept_list\u00a0 |\n+-----------------+---------------------+--+\n| Tom \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | [20]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n| Jerry \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | [10,20] \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n| Riley \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | [20,30,40]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n+-----------------+---------------------+--+\n<\/pre>\n
+--------+------+--+\n| ename\u00a0 | _c1\u00a0 |\n+--------+------+--+\n| Jerry\u00a0 | 2\u00a0 \u00a0 |\n| Riley\u00a0 | 3\u00a0 \u00a0 |\n| Tom\u00a0 \u00a0 | 1\u00a0 \u00a0 |\n+--------+------+--+<\/pre>\n
Solution<\/span><\/h2>\n