We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f81131 commit 8a868b7Copy full SHA for 8a868b7
hcatalog/avg_salary.hql
@@ -0,0 +1,2 @@
1
+SELECT AVG(salary) FROM sample_07;
2
+
hcatalog/avg_salary.pig
@@ -0,0 +1,8 @@
+-- Load table 'sample_07'
+sample_07 = LOAD 'sample_07' USING org.apache.hcatalog.pig.HCatLoader();
3
4
+-- Compute the average salary of the table
5
+salaries = GROUP sample_07 ALL;
6
+out = FOREACH salaries GENERATE AVG(sample_07.salary);
7
+DUMP out;
8
0 commit comments