{"id":60,"date":"2013-03-19T20:10:40","date_gmt":"2013-03-19T20:10:40","guid":{"rendered":"http:\/\/ecodebook.wordpress.com\/?p=60"},"modified":"2013-03-19T20:10:40","modified_gmt":"2013-03-19T20:10:40","slug":"mysql-fetching-distinct-records-from-table-having-count-greater-than-3","status":"publish","type":"post","link":"https:\/\/blog.mycarts.shop\/?p=60","title":{"rendered":"MySQL: Fetching distinct records from table HAVING COUNT greater than 3"},"content":{"rendered":"<p>[code language=&#8221;sql&#8221;]<br \/>\nSELECT city, COUNT(id) AS id<br \/>\nFROM YourTable<br \/>\nGROUP BY city<br \/>\nHAVING COUNT(id) &gt; 3<br \/>\n[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[code language=&#8221;sql&#8221;] SELECT city, COUNT(id) AS id FROM YourTable GROUP BY city HAVING COUNT(id) &gt; 3 [\/code]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[17,18],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-mysql","tag-php"],"_links":{"self":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=60"}],"version-history":[{"count":0,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=\/wp\/v2\/posts\/60\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mycarts.shop\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}