LMSouq
database Open

MySQL - Using COUNT(*) in the WHERE clause

IC
Ice
1 month ago
3 views
Problem Description
I am trying to accomplish the following in MySQL (see `pseudo` code) SELECT DISTINCT gid FROM `gd` WHERE COUNT(*) > 10 ORDER BY lastupdated DESC Is there a way to do this without using a (SELECT...) in the WHERE clause because that would seem like a waste of resources.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base