IP Unity Glenayre interview question

Sequence in sql and sub reports in jasper