16 July 2018 · npac ·       Add to Favorites   Report

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

npac

posted on 16 July 2018

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too

Copied