1. Display the dept information from department table. Select * from dept; 2. Display the details of all employees Select * from emp; 3. Display the name and job for all employees Select ename ,job from emp; 4. Display name and salary for all employees. Select ename , sal from emp; 5. Display employee number and total salary for each employee. Select empno, sal+comm from emp; 6. Display employee name and annual salary for all employees. Select empno,empname,12*sal+nvl(comm,0) annualsal from emp; 7. Display the names of all employees who are working in department number 10 Select ename from emp where deptno=10; 8. Display the names of all employees working as clerks and drawing a salary more than 3000 Select ename from emp where job=’clerk’and sal>3000; 9. Display employee number and names for employees who earn commissi...
Use aggregator without any group by ports which will give last record by default--Sadik
ReplyDeleteuse sequence generator t/r in exp t/r. use sorter t/r for descending . and use filter t/r to get n top numbers.
ReplyDeleteIs it possible to this with Rank tr. ?
ReplyDeleteUse SNO=CURVAL from SG to find out last record.
ReplyDeleteThen select SNO-N records
use variable port to generate ids in exp trans
ReplyDeletevariable port vid(integer) = vid+1;
output port oid(integet)=vid;
pass data to sorter, sort by oid desc
now pass data to exp tr, again generate ids
variable port vidN(integer) = vidN+1;
output port oidN(integet)=vidN;
pass data to filter on oidN=M
we can do through Rank trans also, after generating ids in exp trans... pass data to Rank trans and select top M ranks, rank port need to be oid port