{"id":623,"date":"2025-12-04T07:20:43","date_gmt":"2025-12-03T23:20:43","guid":{"rendered":"https:\/\/book.yuekegu.com\/?p=623"},"modified":"2025-12-04T07:20:44","modified_gmt":"2025-12-03T23:20:44","slug":"%e8%87%aa%e5%8a%a8%e6%9b%b4%e6%96%b0full_score%e5%ad%97%e6%ae%b5%e5%86%85%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/book.yuekegu.com\/index.php\/2025\/12\/04\/%e8%87%aa%e5%8a%a8%e6%9b%b4%e6%96%b0full_score%e5%ad%97%e6%ae%b5%e5%86%85%e5%ae%b9\/","title":{"rendered":"\u81ea\u52a8\u66f4\u65b0full_score\u5b57\u6bb5\u5185\u5bb9"},"content":{"rendered":"\n \n\n\n\n<p>UPDATE sq_testpaper SET full_score = CASE WHEN course IN (1, 2, 3) THEN 150 ELSE 100 END;<\/p>\n\n\n\n<p>&#8212; \u66f4\u65b0\u6709\u5c0f\u9898\u8bb0\u5f55\u7684\u6570\u5b66\u8bd5\u5377\u6ee1\u5206<\/p>\n\n\n\n<p>UPDATE sq_testpaper tp SET full_score = (SELECT SUM(score) FROM sq_testpaperinfo WHERE testpaper_id = tp.id) WHERE tp.course = 2;<\/p>\n\n\n\n<p>&#8212; \u5c06\u6ca1\u6709\u5c0f\u9898\u8bb0\u5f55\u7684\u6570\u5b66\u8bd5\u5377\u6ee1\u5206\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u503c150<\/p>\n\n\n\n<p>UPDATE sq_testpaper SET full_score = 150 WHERE course = 2 AND full_score IS NULL;<\/p>\n\n\n\n \n","protected":false},"excerpt":{"rendered":"<p>UPDATE sq_testpaper SET full_score = CASE WHEN course IN (1, 2, 3) THEN 150 ELSE 100 END; &#8212; \u66f4\u65b0\u6709\u5c0f\u9898\u8bb0\u5f55\u7684\u6570\u5b66\u8bd5\u5377\u6ee1\u5206 UPDATE sq_testpaper tp SET full_score = (SELECT SUM(score) FROM sq_testpaperinfo WHERE testpaper_id = tp.id) WHERE tp.course = 2; &#8212; \u5c06\u6ca1\u6709\u5c0f\u9898\u8bb0\u5f55\u7684\u6570\u5b66\u8bd5\u5377\u6ee1\u5206\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u503c150 UPDATE sq_testpaper SET [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-43"],"_links":{"self":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":1,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":624,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/623\/revisions\/624"}],"wp:attachment":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}