In this Apache Pig learning series I am planning on exercising the Pig script with the following classical Employee and Department table structures and data that we have all seen with popular RDBMes from Oracle, IBM DB2, MS SQL Server, MySQL and others.
Please make sure to follow the subsequent Posts that describe how Apache Pig can allow us to find out the results for our extract criteria. With this Apache Pig exercise series I am hoping to complete the below criteria:
- Display all the information of the emp table.
- Display unique jobs from EMP table.
- List the details of the emps in asc order of their salaries.
- List the details of the emps in asc order of the Deptnos and desc of Jobs.
- Display all the unique job groups in the descending order
- Display all the details of all ‘Mgrs’
- List the emps who joined before 1981.
- List the Empno, Ename, Sal, Daily Sal of all Employees in the ASC order of AnnSal.
- Display the empno , ename, job, hiredate, exp of all Mgrs
- List the empno, ename, sal, exp of all emps working for Mgr 7839.
- Display the details of the emps whose Comm. Is more than their sal.
- List the emps in the asc order of Designations
- List the emps along with their exp and daily sal is more than Rs.100
- List the emps who are either ‘CLERK’ or ‘ANALYST’ in the desc order
- List the emps who joined on 1May81,31Dec81, 17Dec81, 19Jan80 in asc order of seniority.
- List the emps who are working for the deptno 10 or 20
- List the emps who are joined in the year 1981
- List the emps who are joined in the month of Aug 1980
- List the emps whose annul sal ranging from 22000 and 45000
- List the emps those are having five characters in their names.
- List the enames those are starting with ‘s’ and with fire characters
- List the emps those are having four chars and third char must be ‘r’
- List the 5 character names starting with ‘s’ and ending with ‘h’
- List the emps who joined in January
- List the emps who joined in the month of which second character is ‘a’
- List the emps whose sal is 4 digit number ending with zero
- List the emps whose names having a character set ‘ll’ together
- List the emps those who joined in 80’s
Thanks!
Solutions to above queries
ReplyDelete