Jump to content

COUNT DISTINCT with a threshold


l008com

Recommended Posts

I've got a simple query that counts distinct items in a table

SELECT COUNT(DISTINCT flag_rest_spam.msgid) FROM flag_rest_spam

What I want to do is add a threshold to the count. What I mean is I want to count distinct items in the table, but i only want to count items that have more than N number of items. I'm not sure how to do this?

Link to comment
https://forums.phpfreaks.com/topic/133969-count-distinct-with-a-threshold/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.