Microsoft
Software
Hardware
Network
Question : Count query help
I need to creat a query that returns items in my table that appear > 3 times and I'm getting a little stuck on the syntax.
I have a table containing:
ID Instance Code
I want to return a list of all Codes where that code appears more than 3 times. I am getting stuck on how to select these distinct codes, any help much appreciated.
Answer : Count query help
Correction :
1:
SELECT Code, COUNT(*) FROM yourTable GROUP BY Code HAVING COUNT(*)>3
Open in New Window
Select All
Random Solutions
Undoing a record
Help with syntax of a vba range definition / sum
SQL Mail does not work with the 64-bit version of SQL Server
ERROR IN HEADER - DISPLAYS IN PREVIEW BUT DOES NOT PRINT
Access 2007 lost focus event
WSAEventSelect returns err WSAENOTSOCK
aspx/c# looping through data from within body
IE8 desktop short cuts won't open maxed.
SQLServer 2005
copy and paste an array formula?