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

\n\n

A query is logically processed in a specific order:

\n\n
    \n
  1. FROM: create the basic result set
  2. \n
  3. WHERE: remove rows from the previous result set
  4. \n
  5. GROUP BY: apply aggregate functions on the previous result set
  6. \n
  7. HAVING: remove rows from the previous result set
  8. \n
  9. OVER: apply windowed aggregate functions on the previous result set
  10. \n
  11. QUALIFY: remove rows from the previous result set
  12. \n

nVector

posted on

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