Aggregate function in SQL WHERE-Clause

前端 未结 6 585
失恋的感觉
失恋的感觉 2020-11-27 15:22

In a test at university there was a question; is it possible to use an aggregate function in the SQL WHERE clause.

I always thought this isn\'t possibl

6条回答
  •  天命终不由人
    2020-11-27 15:36

    SELECT COUNT( * )   
    FROM agents   
    HAVING COUNT(*)>3;  
    

    See more below link:

    • http://www.w3resource.com/sql/aggregate-functions/count-having.php#sthash.90csRM4I.dpuf][1] call me if any query:85110 51548

    • http://www.w3resource.com/sql/aggregate-functions/count-having.php

提交回复
热议问题