Page 1 of 1

How to get the Rank and AVG

Posted: Mon Jul 28, 2008 6:04 am
by deesh
Hi,
I have one doubt, I am generating the mark list for a school,
Here I need "AVG" per subject , and I need rank wise students.

Example:
In VI class have 50 students and 5 subjects, I need each subject "AVG" of 50 students, and need Highest score basis rank. I need to fill AVG in One target and Rank in Another Target.

Posted: Mon Jul 28, 2008 3:47 pm
by ray.wurlod
DataStage is not a reporting tool. You would ordinarily use regular SQL to get these answers.

An Aggregator stage can give you an average (mean).

Rank is more difficult, particularly when you have not specified how you wish tied ranks to be handled. An ETL approach would typically involve sorted data and comparison with previous row (plus, perhaps, counters to handle tied ranks). An ETL approach is not a Good Thing.

Rely on a reporting (or business intelligence) tool to produce these figures.