DataBase | 18:16PostgreSQLã§ãéç´é¢æ°ä½ããã®ã¯ç¥ã£ã¦ããã©ããªãã»ã©ãããã¯ããã¨æã£ããGROUP BYã§ãã°ã«ã¼ãåããã¦ãªãã«ã©ã nameããHavingå¥ã§ãsum( case when name æ¡ä»¶ then 1 else 0 end) > 0ã¨ããã¦ãSELECTæã§ãã®éç´é¢æ°ä½¿ã£ã¦ãªã¹ãåãããã¡ããCASEå¼ãdistinctã使ããã確ãã«ã表示é ã¯ä¿è¨¼ã§ããªããããããã¯ã¢ããªã±ã¼ã·ã§ã³å´ã§ãããããã£ã¦ããã¨ããããªæãããªãªãããä¸çãåºãã£ãæ°ãããMySQL ã§ã¯ãGROUP_CONCAT(expr)ã¨ãã便å©ãªé¢æ°ãããã®ããORDER BYã使ããã®ãç´ æµãè¦ãã§ãã¯PostgreSQL ã§ã¯ãéç´é¢æ°ãèªåã§å®ç¾©ã§ããããã¾ãããããä½ã£ã¦ãã¾ãã¨ãSELECT id, SUM(point) FROM Points GROU
{{#tags}}- {{label}}
{{/tags}}