{"type":"rich","width":"100%","published":"2012-11-04 22:56:18","blog_url":"https://tmotooka.hatenablog.jp/","title":"\u6697\u9ed9\u306eGroup By","categories":["MySQL","PostgreSQL"],"author_name":"t_motooka","author_url":"https://blog.hatena.ne.jp/t_motooka/","version":"1.0","height":"190","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","blog_title":"\u8077\u696d\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u4f11\u65e5\u51fa\u52e4","url":"https://tmotooka.hatenablog.jp/entry/2012/11/04/225618","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftmotooka.hatenablog.jp%2Fentry%2F2012%2F11%2F04%2F225618\" title=\"\u6697\u9ed9\u306eGroup By - \u8077\u696d\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u4f11\u65e5\u51fa\u52e4\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u3053\u306e\u8a18\u4e8b\u306fMySQL\u306edis\u3063\u3066\u308b\u8a18\u4e8b\u2026\u306e\u3088\u3046\u306b\u898b\u3048\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u300c\u9577\u5e74\u7d99\u304e\u8db3\u3057\u3066\u719f\u6210\u3055\u308c\u3066\u304d\u305f\u79d8\u4f1d\u306e\u30bd\u30fc\u30b9\u300d\u3092dis\u308b\u8a18\u4e8b\u3067\u3059\u3002 \u539f\u7406\uff1f\u306f MySQL\u306eGroup By - \u8077\u696d\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u4f11\u65e5\u51fa\u52e4 \u3084 distinct \u3068 order by - \u8077\u696d\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u4f11\u65e5\u51fa\u52e4 \u3068\u540c\u3058\u3067\u3059\u3002 \u30c6\u30b9\u30c8\u7528\u30c6\u30fc\u30d6\u30eb\u306e\u5b9a\u7fa9\u3068\u3001\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\uff08PostgreSQL\u3067\u3082MySQL\u3067\u3082\u52d5\u4f5cOK\uff09 create table test20121105 ( id int primary key, category int, val int ); insert into test20121105 values(1,\u2026","image_url":null}