{"categories":["SQL"],"author_name":"bleis-tift","blog_url":"https://bleis-tift.hatenablog.com/","provider_name":"Hatena Blog","type":"rich","title":"","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/bleis-tift/","description":"col1 col2 col3 col4 1001 2323 500 0 456 1001 0 200 1111 1001 0 300 \u3053\u3093\u306a\u611f\u3058\u306b\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3066\u3001 col1-2 sum(col3) sum(col4) 1001 500 500 \u306a\u611f\u3058\u306bcol1\u304bcol2\u304c1001\u306b\u306a\u3063\u3066\u308b\u3084\u3064\u306ecol3\u3068col4\u3092\u96c6\u8a08\u3057\u305f\u3044\u5834\u5408*1\u3001 SELECT CASE col3 WHEN 0 THEN col2 ELSE col1 END AS 'col1-2' , sum(col3) , sum(col4) FROM SomeTable WHERE 1001 IN (col1, col2) GROU\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20080417%2F1208435979\" title=\" - \u3050\u308b\u3050\u308b\uff5e\" 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","blog_title":"\u3050\u308b\u3050\u308b\uff5e","image_url":null,"url":"https://bleis-tift.hatenablog.com/entry/20080417/1208435979","version":"1.0","width":"100%","published":"2008-04-17 21:39:39"}