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
Describe the grant/revoke ddl facility and how it is implemented?
How to replace last 4 digits of an input column with XXXX given input column has 12 digits?
What do you mean by data sorting?
How to compare two dmls in abinitio
Describe in detail about lookup?
How co>operating system integrates with legacy codes?
What information is provided by .dbc file extension for connecting to the database?
Tell us about the architecture of abinitio.
What exactly do you know about the typical data analysis?
Mention what is abinitio?
How co> operating system natively processes the data?
Can you explain the co>operating system’s processing model?
What is the difference between partitioning with key / hash and round robin?
Hi friends, what are the new features in abinito3.0?
We know rollup component in abinitio is used to summarize group of data record then why do we use aggregation?