Home > Software > Data-Warehouse > Informatica
Interview Questions   Tutorials   Discussions   Programs   

Informatica - How to find from a source which has 10,000 records, find the average between 500th to 600th record?




442
views
asked marvit September 20, 2014 07:59 AM  

How to find from a source which has 10,000 records, find the average between 500th to 600th record?


           

1 Answers



 
answered By vishnoiprem   0  
Your answer is correct for the flat files. But the RElation
query you have given won't give any records.
the Query should like this
select avg(sal) from
(select emp_id, sal, rownum rnum from (
select emp_id,sal from emp order by sal desc) )where rnum
between 500 and 600
generates the sequence numbers. Pass them into a filter 
transformation to filter the records between 500 and 600. 
And do the required aggregation through Aggregator 
Transformation.
Through SQL :
select avg(sal) from (select id,name,sal,rownum r from 
table_name )
where r between 500 and 600;
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert