How can you find the 2nd Highest salary in a file department wise in abinitio?

Answer Posted / murali krishna udayagiri

Yes Vital is correct. This can be acheived using SCAN
component with only one variable.

1.Input_file
2.Sort with in group (dno asc,sal desc)
3.scan
###############################################
type temporary_type=record
integer(4) temp1;end;
temp :: initialize(in) =
begin
temp.temp1::0;
end;

out :: scan(temp, in) =
begin
out.temp1 :: temp.temp1 + 1;
end;

out :: finalize(temp, in) =
begin
out.sal:: in.sal;
out.dno :: in.dno;
out.temp1 :: temp.temp1;
end;
out :: output_select(out) =
begin
out::out.temp1 == 2;
end;
###############################################
4.Output_file

Thanks,
Murali Udayagiri
Mail id: udayagiri.murali@gmail.com

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How scientific data processing is different from commercial data processing?

825


What are the functions of the replicate and dedup component?

813


What are the different types of partition components in abinitio?

1045


What is is a data flow graph?

841


What do you understand by a cartesian join?

862


How to create a repository in abinitio for stand-alone system(local nt)?

843


What do you mean by a transaction file?

892


What does edp stand for?

896


What is ab initio enterprise meta>environment (eme)?

1175


What dedup-component and replicate component does?

970


What is conduct>it?

856


what is the difference between i)public ii)private iii)common and client projects?

1917


Mention what is abinitio?

764


What is the difference between partitioning with key / hash and round robin?

865


explain checkin and checkout?

852