2025å¹´2æ13æ¥ã«æ±äº¬ã§éå¬ãããããªã©ã¯ã«ã®ãã¯ããã¸ã¼ããã³ãããã¯ã¼ãã³ã°ã¤ãã³ããCloudWorld Tourãã«ãã²ãåå ãã ããããªã©ã¯ã«ã®ã¨ã°ã¼ã¯ãã£ããå°é家ããã¼ããã¼ãåæ¥ä»ç¤¾ã¨äº¤æµããã¯ã©ã¦ããAIãªã©ã«ã¤ãã¦æè¦ã交ããã¾ãããã
RDBMSã使ã£ã¦ã·ã¹ãã ãæ§ç¯ããã«ã¯ï¼RDBMSã«ã¢ã¯ã»ã¹ããããã®å°ç¨è¨èªãSQLããç¿å¾ããå¿ è¦ããããSQLã¯ï¼C/C++ãJava ãªã©ã¨åããããªããã°ã©ãã³ã°è¨èªã¨èãã¦æ±ãã¨å¤±æããããã æ±ç¨ã®ããã°ã©ãã³ã°è¨èªã®å¤ãã¯ãæç¶ãåãã¨å¼ã°ãï¼å¦çæé ãããã°ã©ãã³ã°ããè¨èªã§ãããä¸æ¹ã®SQLã¯ãéæç¶ãåãã¨å¼ã°ããè¨èªã§ï¼å¦çæé ã¯ããã°ã©ãã³ã°ããªããããããéããä¸å¿ã«ï¼SQLã使ãå§ããéã«é¥ãããã失æãæ°ãã¤ããã¹ãç¹ãªã©ã解説ããã ã»ç¬¬1åï¼ååï¼ãæ¡ä»¶å¥ã®æ³¨æç¹ ã»ç¬¬1åï¼å¾åï¼ãæ¼ç®ã®åªå é ä½ï¼ã½ã¼ãã®æ³¨æç¹ ã»ç¬¬2åï¼ååï¼ãæåååã®æ³¨æç¹(1) ã»ç¬¬2åï¼å¾åï¼ãNULLå¤ï¼è¤åã¤ã³ããã¯ã¹ã®æ³¨æç¹ ã»ç¬¬3åï¼ååï¼ãæ¥ä»åã®æ³¨æç¹ ã»ç¬¬3åï¼å¾åï¼ãéç´é¢æ°ï¼GROUP BYå¥ï¼HAVINGå¥ã®æ³¨æç¹ ã»ç¬¬4åãå¯åãåããï¼ãã¥ã¼ã®æ³¨æç¹
ãµã¼ãã¹çµäºã®ãç¥ãã ãã¤ãYahoo! JAPANã®ãµã¼ãã¹ããå©ç¨ããã ãèª ã«ãããã¨ããããã¾ãã ã客æ§ãã¢ã¯ã»ã¹ããããµã¼ãã¹ã¯æ¬æ¥ã¾ã§ã«ãµã¼ãã¹ãçµäºãããã¾ããã ä»å¾ã¨ãYahoo! JAPANã®ãµã¼ãã¹ããæ顧ãã ããã¾ãããããããããé¡ããããã¾ãã
ããã§ã¯ããªã¬ã¼ã·ã§ãã«åãã¼ã¿ãã¼ã¹ãæä½ããããã«å¿ é ã¨ãªãä¸çæ¨æºè¨èª SQL ã«ã¤ãã¦ãåºç¤ããå¿ç¨ã¾ã§è©³ãã説æãã¦ãã¾ãã ã¾ããSQL ã®ã¿ã«ã¨ã©ã¾ããããªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ããã¼ã¸ã¡ã³ãã·ã¹ãã (RDBMS) ã®æã¤æ§ã ãªæ©è½ã«ã¤ãã¦è©³ãã説æãã¦ãã¾ãã æå¾ã«ã¯ããã¼ã¿ãã¼ã¹ã®è¨è¨ã«é¢ããé常ã«éè¦ãªèãæ¹ã«ã¤ãã¦ã触ãã¦ãã¾ãã®ã§ãããããå ¨ã¦å¦ç¿ããã¨ããã¼ã¿ãã¼ã¹ã®æä½ããè¨è¨ã¾ã§å¹ åºãç¥èã身ã«ã¤ãããã¨ãã§ããã§ãããã SQL INDEX 1. ãã¼ã¿ãã¼ã¹ã®æ¦è¦ 1.1. ãã¼ã¿ãã¼ã¹ã¨ã¯ 1.2. ãã¼ã¿ãã¼ã¹ã·ã¹ãã ã®ç¹å¾´ 1.3. ãã¼ã¿ãã¼ã¹ã¨ãã¡ã¤ã«ã®éã 1.4. 代表çãªãã¼ã¿ã¢ãã« 1.5. ãªã¬ã¼ã·ã§ãã«åãã¼ã¿ãã¼ã¹ 1.6. ã¾ã¨ã 2. SQL 2.1. SQL ã®æ´å² 2.2. SQL ã¨ã¯ 2.3. SQL ã®æ©è½ 2.
ç©å¿ãã®æ¿ãã管ç人ã¯ã調ã¹ããã¨ãããå¿ãã¦ãã¾ãã®ã§ãåããã¨ããä½åº¦ã調ã¹ãªããéçºãã¦ãã¾ãã ãã ãITæ¥çã¯è¦ãããã¨ãå¤éãã¦ãææ³ãªã©ã®ç´°ãããã¨ã¯ãã¾ãè¦ããæ°ãç¡ãã¨ããã®ãããã¾ããï¼ç¬ï¼ ããã§ãä½åº¦ãåããã¨ã調ã¹ãªãã¦ãããããã«ãORACLE SQLãªãã¡ã¬ã³ã¹ããµã¤ãã«ã¾ã¨ããäºã«ãã¾ããã ç§ã¨åããããªããã°ã©ãã¼ãSEãçµæ§ããããããªããã¨æãã¾ãã®ã§ä½¿ãããã ã£ããå©ç¨ãã¦ã¿ã¦ä¸ããã
CodeZineç·¨éé¨ã§ã¯ãç¾å ´ã§æ´»èºãããããããã¼ãã¹ã¿ã¼ã«ããããã®ã«ã³ãã¡ã¬ã³ã¹ãDevelopers Summitãããã¨ã³ã¸ãã¢ã®çããã¾ããã¼ã¹ãããããã®ã¤ãã³ããDevelopers Boostããªã©ããã¾ãã¾ãªã«ã³ãã¡ã¬ã³ã¹ãä¼ç»ã»éå¶ãã¦ãã¾ãã
æ¬é£è¼ã¯SQLã®å¿ç¨åã身ã«ä»ãããã¨ã³ã¸ãã¢åãã«ããã¾ãã¾ãªãã¯ããã¯ãç´¹ä»ãããSQLã®åºæ¬æ§æã¯å¹³æãªãã®ã ããå®åã§æ´»ç¨ããã«ã¯æç§æ¸çãªè¨è¿°ãç解ããã ãã§ã¯ä¸ååã ãæ¬é£è¼ã¯ãèåãªã¡ã¼ã«ãã¬ã¸ã³ãããï¼ãªã©ï¼ Oracle - ã©ã£ã·ãæ¤è¨¼çæ´»ããçºè¡ããã¤ã³ãµã¤ããã¯ããã¸ã¼ã®ã³ã³ãµã«ã¿ã³ããå·çé£ã«è¿ããSQLã®ã»ã³ã¹åä¸ã«å½¹ç«ã¤å¤§æå°æãç´¹ä»ãã¦ãããï¼ç·¨éå±ï¼ ä»åããååãSQLåæé¢æ°ãããã«æ·±ã追æ±ãã¦ã¿ããããåã åã極ãããï¼åæé¢æ°ã«ããSQLé«éåè¨ç»ãã«å¼ãç¶ããåæé¢æ°ã«ã¤ãã¦ã®ã話ã§ããä»åã¯ãã©ã°ã»ãªã¼ãé¢æ°ã説æãã¦ãåæé¢æ°ã·ãªã¼ãºã®æçµåã¨ãã¾ãã ã©ã°é¢æ°ã使ã£ãåæ ããã§ã¯ãã©ã°ã»ãªã¼ãé¢æ°ãå©ç¨ãã¦ãåæãã¦ã¿ã¾ããããã¾ãã¯ãã©ã°é¢æ°ããè¦ã¦ããã¾ãã ã©ã°é¢æ°ã¯ãç¾å¨ã®è¡ããã®ãªãã»ãããæå®ããã ãã§ããã®ä½ç½®ãããåãã«ã
æ¬é£è¼ã¯SQLã®å¿ç¨åã身ã«ä»ãããã¨ã³ã¸ãã¢åãã«ããã¾ãã¾ãªãã¯ããã¯ãç´¹ä»ãããSQLã®åºæ¬æ§æã¯å¹³æãªãã®ã ããå®åã§æ´»ç¨ããã«ã¯æç§æ¸çãªè¨è¿°ãç解ããã ãã§ã¯ä¸ååã ãæ¬é£è¼ã¯ãèåãªã¡ã¼ã«ãã¬ã¸ã³ãããï¼ãªã©ï¼ Oracle - ã©ã£ã·ãæ¤è¨¼çæ´»ããçºè¡ããã¤ã³ãµã¤ããã¯ããã¸ã¼ã®ã³ã³ãµã«ã¿ã³ããå·çé£ã«è¿ããSQLã®ã»ã³ã¹åä¸ã«å½¹ç«ã¤å¤§æå°æãç´¹ä»ãã¦ãããï¼ç·¨éå±ï¼ ä»åããååã極ãããï¼åæé¢æ°ã«ããSQLé«éåè¨ç»ãã«å¼ãç¶ããåæé¢æ°ã®ä¸ããã¦ã£ã³ãã¦é¢æ°ã¨ã¬ãã¼ãé¢æ°ãåãä¸ãã¦èª¬æãã¾ãã ã¦ã£ã³ãã¦é¢æ°ã使ã£ãåæ ããã§ã¯ãã¦ã£ã³ãã¦é¢æ°ãå©ç¨ãã¦ãåæãã¦ã¿ã¾ããããã¦ã£ã³ãã¦é¢æ°ã使ç¨ãã¦ãç´¯ç©éè¨ã移åéè¨ãéä¸éè¨ãè¨ç®ã§ãã¾ããä»åã¯ãã¦ã£ã³ãã¦é¢æ°ãç°¡åã«ç解ãã¦ãããããã«ãç´¯ç©éè¨ã«ã¤ãã¦èª¬æãã¾ãã ã¦ã£ã³ãã¦é¢æ°ã«ã¯ãSUM()ãAVG
æ¬é£è¼ã¯SQLã®å¿ç¨åã身ã«ä»ãããã¨ã³ã¸ãã¢åãã«ããã¾ãã¾ãªãã¯ããã¯ãç´¹ä»ãããSQLã®åºæ¬æ§æã¯å¹³æãªãã®ã ããå®åã§æ´»ç¨ããã«ã¯æç§æ¸çãªè¨è¿°ãç解ããã ãã§ã¯ä¸ååã ãæ¬é£è¼ã¯ãèåãªã¡ã¼ã«ãã¬ã¸ã³ãããï¼ãªã©ï¼ Oracle - ã©ã£ã·ãæ¤è¨¼çæ´»ããçºè¡ããã¤ã³ãµã¤ããã¯ããã¸ã¼ã®ã³ã³ãµã«ã¿ã³ããå·çé£ã«è¿ããSQLã®ã»ã³ã¹åä¸ã«å½¹ç«ã¤å¤§æå°æãç´¹ä»ãã¦ãããï¼ç·¨éå±ï¼ ä»åã¯Oracle8iï¼ãªãªã¼ã¹8.1.6ï¼ããå®è£ ããã¦ããåæé¢æ°ã«ã¤ãã¦è§£èª¬ãã¾ããåææ©è½ãç解ãã¦ããã¨ããã¾ã¾ã§ã¯å¯åãåãããè¤æ°åã«åãã¦ããåãåããã1åã®SQLæã§ç°¡åã«è¡ããããã«ãªãã¾ãã åæé¢æ°ã®åºæ¬ãç解ããã ã¾ããåæé¢æ°ã¨ã¯ãã©ã®ãããªé¢æ°ã§ããã®ããç°¡åã«èª¬æãã¦ããã¾ãããã éè¨é¢æ°ã¨åæé¢æ°ã®éãã¯ï¼ åæé¢æ°ã¯ãã©ã®ããã«å¦çãããã®ï¼ åæé¢æ°ã¯ãã©ã®ãããªå
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}