What is the difference between Qualify and Having - Teradata

Having can be used only when we can do a group-by clause
Whereas we can use Qualify without having to group anything


QUALIFY
is a proprietary extension to filter the result of a Windowed Aggregate Function

A query is logically processed in a specific order:

  1. FROM: create the basic result set
  2. WHERE: remove rows from the previous result set
  3. GROUP BY: apply aggregate functions on the previous result set
  4. HAVING: remove rows from the previous result set
  5. OVER: apply windowed aggregate functions on the previous result set
  6. QUALIFY: remove rows from the previous result set

nVector

posted on 16 Jul 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds