é£çªãæ¯ãç´ãããããã¯éè¨çµæã§ãã¼ãã«ãæ´æ°ãããªã©ã
ãã¾ã«ãã使ããªãããDBMSã«ãã£ã¦è¨è¿°æ¹æ³éãã®ã§ãããã£ã¡ã
ãããããå¿ãã¦å°ãã®ã§èªåç¨ã¡ã¢ã
ã¡ãªã¿ã«DBã¯postgresqlã
ãµã³ãã«ã¯ã¨ãããã¼ãã«ã®é
ç®ã«é£çªãæ¯ãç´ãããã¨ãç¨ã®ã¢ãããã¼ãæ
UPDATE target_table SET target_column = (SELECT count(*) FROM target_table t1 inner join target_table t2 on t1.id>=t2.id WHERE target_table.id = t1.id GROUP BY t1.id )
ã©ãã§ããããã©WEBç³»ã®ããã°ã©ã ã£ã¦ããã¾ããã¡ããã¡ãããSQLæ¸ããã¨ãå°ãªããªã¼ã¨ãæã£ãããããã§ããªãã®ããªã