3.5. ã¦ã£ã³ãã¦é¢æ°ã¦ã£ã³ãã¦é¢æ°ã¯ç¾å¨ã®è¡ã«ä½ããã¨ãé¢ä¿ãããã¼ãã«è¡ã®ä¸çºã¾ãå
¨è¬ã®è¨ç®ãè¡ãã¾ãã ããã¯éç´é¢æ°ã«ããè¡ãããè¨ç®ã®å½¢å¼ã¨ä¼¼ããããªãã®ã§ãã ã¨ã¯è¨ã£ã¦ããé常ã®éç´é¢æ°ã¨ã¯ç°ãªããã¦ã£ã³ãã¦é¢æ°ã®ä½¿ç¨ã¯åä¸åºåè¡ã«è¡ãã°ã«ã¼ãåãã¾ããã è¡ã¯ããããåå¥ã®èº«å
ãç¶æãã¾ãã è£å´ã§ã¯ãã¦ã£ã³ãã¦é¢æ°ã¯åãåããçµæã«ããç¾å¨è¡ã ãã§ãªãããã以ä¸ã®è¡ã«ã¢ã¯ã»ã¹ãããã¨ãã§ãã¾ãã ããã¯ãã®é¨ç½²ã®å¹³å給ä¸ã¨ããããã®å¾æ¥å¡ã®çµ¦ä¸ãã©ã®ããã«æ¯è¼ãããã示ããä¾ã§ãã SELECT depname, empno, salary, avg(salary) OVER (PARTITION BY depname) FROM empsalary; depname | empno | salary | avg -----------+-------+--------
{{#tags}}- {{label}}
{{/tags}}