0 - 3 of 3 tags for partiton by

Hello all,
This is my first post in the forum and please excuse me if i am off the hook with my post.
I am writing a sql logic and i am stuck at a point where i am not sure how to proceed.  I am hereby giving some synopsis about the issue and i will really appreciate if you can guide me how to proceed to the resolution.

Hello All,
I know the functionality of group by function and partition by function. But when i use both the queries in the same query i get an error as Selected non-aggregate must be part of the group.
Below is the query i tried.


I am a beginner concerning the Teradata. I was trying to find simple descriptions on the internet about functions QUALIFY; RANK; OVER; PARTITION BY - unfortunately unsuccessfully. I coudn't find a simple explanation what does each of the funcions do.

Can anyone send me a link or give a explanation about this functions.