GROUP BY å¥ã使ç¨ããã¨ããµããªã¼åºåã«ä¸ä½ã¬ãã« (ã¤ã¾ããä¸ä½éè¨) ã®ãµããªã¼æä½ã表ã追å ã®è¡ãå«ãããã¨ãã§ãã WITH ROLLUP 修飾åã許å¯ããã¾ãã ãããã£ã¦ãROLLUP ã§åä¸ã®ã¯ã¨ãªã¼ã使ç¨ããã°ãè¤æ°ã¬ãã«ã®åæã§è³ªåã«åçã§ãã¾ãã ãã¨ãã°ãROLLUP ã使ç¨ã㦠OLAP (ãªã³ã©ã¤ã³åæå¦ç) æä½ããµãã¼ãã§ãã¾ãã sales ãã¼ãã«ã«ã売ä¸åçæ§ãè¨é²ããããã® year, country, product ã«ã©ã 㨠profit ã«ã©ã ãããã¨ãã¾ã: CREATE TABLE sales ( year INT, country VARCHAR(20), product VARCHAR(32), profit INT ); å¹´ãã¨ã«ãã¼ãã«ã®å
容ãè¦ç´ããã«ã¯ã次ã®ãããªåç´ãª GROUP BY ã使ç¨ãã¾ã: mysql> SE
{{#tags}}- {{label}}
{{/tags}}