(PgDay2012çºè¡¨è³æ) SQLã«ã¨ã£ã¦ããªãO/Rãããã¼ãéè¦ãã説æããè³æã§ããRead less
(PgDay2012çºè¡¨è³æ) SQLã«ã¨ã£ã¦ããªãO/Rãããã¼ãéè¦ãã説æããè³æã§ããRead less
December 07, 201208:49 ã«ãã´ãªããã°ã©ãã³ã°mysql O/Rãããã¼ã¯ãªãæªã ã¿ã¤ã ã©ã¤ã³ã§ãSQLä¸ç´è ããç¥ã£ã¦æ¬²ããããªãO/Rãããã¼ãéè¦ãï¼ãã£ã¦ã®ãè¦ããã¦å± ã¦ãç«ã£ã¦ãããããªããªã£ãã®ã§ãæ¢åºãæ¿ç¥ã§åè«ãã¦ããããã ã¹ã©ã¤ãã ããã話ã®å 容ãæ¨æ¸¬ããã¨ã -- 販売æ績ä¸ä½10åãæ½åº select * from sales where deleted = false order by amount desc limit 10 ã¨ãã£ãSQLã Sales.active().top(10).all() ã®ããã«ãç´°ããå解ããé¨åãçµã¿åããã¦è¡¨ç¾ã§ããæ¹ã便å©ã ãæ§é çã§ããï¼ã¨ãã話ã®ããã ã ããã¯ç¢ºãã«ä¸è¦ç¾ããã®ã ããããããããæ·å± ãä¸ãããã¦ãdbã®æ§è³ªãåãã£ã¦ãªã人ã¾ã§æ°è»½ã«SQLããããããã«ãªã£ãçµ
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}