8. OpenSQL Statements : Select (interactive) : Having Clause
 
Share this page                  
Having Clause
The HAVING clause filters the results of the GROUP BY clause, in the same way the WHERE clause filters the results of the SELECT...FROM clauses. The HAVING clause uses the same restriction operators as the WHERE clause.
For example, to return the number of orders placed today for each part:
select odate, partno, count(*) from orders
group by odate, partno
having odate = date('today');