Hi my table looks like this
Combination of Rows with same S id is termed as a family. Output should have a Calculated Tier code based on below derivation
Output put should be Output
First time i am using Stackoverflow. I need a query in db2 and I can use the output as a report.
You need windows function as follows: