Difference between where and having clause

Having clause is used after group by clause whereas where clause is used before group by clauseHaving clause is used to filter the groups and where clause is used to filter rows Syntax select customer_id,Count(*) as visits from Customer_Info where age>25 group by customer_id having Count(*)>10

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started