{"blog_url":"https://www.shigemk2.com/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.shigemk2.com%2Fentry%2F2019%2F03%2F01%2F220208\" title=\"\u6761\u4ef6\u7d50\u679c\u306ecount distinct - by shigemk2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","image_url":null,"provider_url":"https://hatena.blog","width":"100%","author_name":"shigemk2","title":"\u6761\u4ef6\u7d50\u679c\u306ecount distinct","description":"\u3053\u3046\u3044\u3046\u304b\u3093\u3058\u3067\u6761\u4ef6\u5f0f\u306e\u7d50\u679c\u3092count distinct\u3067\u304d\u308b select count(distinct tag) as tag_count, count(distinct (case when entryId > 0 then tag end)) as positive_tag_count from your_table_name; sql - COUNT DISTINCT with CONDITIONS - Stack Overflow","blog_title":"by shigemk2","published":"2019-03-01 22:02:08","type":"rich","url":"https://www.shigemk2.com/entry/2019/03/01/220208","categories":["SQL"],"provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/shigemk2/"}