SQL: having count

select * from game g join team_game tg on g.id = tg.game_id group by g.id having count(g.id) > 2
The HAVING clause is used with the GROUP BY clause. It can be used in a SELECT statement to filter the records that a GROUP BY returns.


As an Amazon Associate I earn from qualifying purchases.

No comments:

Post a Comment

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

Popular Recent Posts

Most Popular Articles

apt quotation..