{"id":15412,"date":"2022-08-25T06:00:00","date_gmt":"2022-08-24T21:00:00","guid":{"rendered":"https:\/\/www.muscle-hypertrophy.com\/?p=15412"},"modified":"2022-07-17T09:03:56","modified_gmt":"2022-07-17T00:03:56","slug":"fischer%e3%81%ae%e7%9b%b4%e6%8e%a5%e7%a2%ba%e7%8e%87%e3%82%92%e6%b1%82%e3%82%81%e3%82%8b%e3%82%b9%e3%83%88%e3%82%a2%e3%83%89%e3%83%97%e3%83%ad%e3%82%b7%e3%83%bc%e3%82%b8%e3%83%a3%e3%82%92sql-server","status":"publish","type":"post","link":"https:\/\/www.muscle-hypertrophy.com\/?p=15412","title":{"rendered":"Fisher\u306e\u76f4\u63a5\u78ba\u7387\u3092\u6c42\u3081\u308b\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092SQL Server\u3067\u5b9a\u7fa9\u3059\u308b"},"content":{"rendered":"\n<p>\u3000\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f<a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=15405\" target=\"_blank\" rel=\"noopener\">\u968e\u4e57\u306e\u81ea\u7136\u5bfe\u6570\u3092\u6c42\u3081\u308b\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\u3092SQL Server\u3067\u4f5c\u6210\u3059\u308b<\/a>\u3092\u8a18\u8ff0\u3057\u305f\uff0e\u4eca\u56de\u306f\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\u3092\u7528\u3044\u3066Fisher\u306e\u76f4\u63a5\u78ba\u7387\u3092\u6c42\u3081\u308b\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u8a18\u8ff0\u3059\u308b\uff0e<\/p>\n<p><!--more--><\/p>\n<h2>\u56db\u5206\u8868\u3092\u4f5c\u6210\u3059\u308b\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3<\/h2>\n<p>\u3000<a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=14504\" target=\"_blank\" rel=\"noopener\">\u71b1\u4e2d\u75c7\u306e\u642c\u9001\u4eba\u54e1\u3068\u6700\u9ad8\u6c17\u6e29\u3068\u306e\u76f8\u95a2\u95a2\u4fc2\u3092\u53ef\u8996\u5316\u3057\u95be\u5024\u3092\u03c7\u4e8c\u4e57\u691c\u5b9a\u3059\u308b<\/a>\u3067\u306f\u56db\u5206\u8868\u3092\u4f5c\u6210\u3059\u308b\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u4f5c\u6210\u3057\u305f\uff0e\u4eca\u56de\u306f\u305d\u3053\u306b\u5217\u3092\u4e00\u3064\u8ffd\u52a0\u3059\u308b\uff0e<\/p>\n<h2>Fisher\u306e\u76f4\u63a5\u78ba\u7387<\/h2>\n<p>\u3000P = (a+b)!(c+d)!(a+c)!(b+d)!\/a!b!c!d!N! \u304c\u5b9a\u7fa9\u3067\u3042\u308b\uff0e\u4f8b\u306b\u3088\u3063\u3066\uff0cExp(LN(P)) = P \u306f\u81ea\u660e\u3067\u3042\u308b\uff0e\u3053\u308c\u3092\u30b3\u30fc\u30c9\u3068\u3057\u3066\u5b9f\u88c5\u3059\u308b\uff0e<\/p>\n<h2>\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u5b9a\u7fa9<\/h2>\n<p>\u3000\u4e0b\u8a18\u30b3\u30fc\u30c9\u3092\u30af\u30a8\u30ea\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u5b9f\u884c\u3059\u308b\uff0e\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\uff08\u3053\u3053\u3067\u306f LOG_FACT\uff09\u306e\u524d\u306bdbo.\u3092\u66f8\u304d\u52a0\u3048\u3066\u304a\u304b\u306a\u3044\u3068\uff0c\u300c\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u540d\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u307e\u305b\u3093\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u308b\uff0e<\/p>\n<pre>ALTER PROCEDURE [dbo].[Temperature_Death]\n\t@Temperature int\nAS\nBEGIN\nSELECT\t@Temperature\t\t\t\t\t\t\t\t\tAS '\u95be\u5024'\n,\tSUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] &gt; 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &gt;= @Temperature THEN 1 ELSE 0 END)\tAS a\n,\tSUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] = 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &gt;= @Temperature THEN 1 ELSE 0 END)\tAS b\n,\tSUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] &gt; 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &lt;  @Temperature THEN 1 ELSE 0 END)\tAS c\n,\tSUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] = 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &lt;  @Temperature THEN 1 ELSE 0 END)\tAS d\n,\tSUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] &gt; 0 THEN 1 ELSE 0 END)\t\t\t\tAS 'a+c'\n,\tSUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] = 0 THEN 1 ELSE 0 END)\t\t\t\tAS 'b+d'\n,\tSUM(CASE WHEN T.\u65e5\u6700\u9ad8\u6c17\u6e29 &gt;= @Temperature THEN 1 ELSE 0 END)\t\t\tAS 'a+b'\n,\tSUM(CASE WHEN T.\u65e5\u6700\u9ad8\u6c17\u6e29 &lt;  @Temperature THEN 1 ELSE 0 END)\t\t\tAS 'c+d'\n,\tCOUNT(*)\t\t\t\t\t\t\t\t\tAS N\n,\tExp(dbo.LOG_FACT(SUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] &gt; 0 THEN 1 ELSE 0 END))\n+\tdbo.LOG_FACT(SUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] = 0 THEN 1 ELSE 0 END))\n+\tdbo.LOG_FACT(SUM(CASE WHEN T.\u65e5\u6700\u9ad8\u6c17\u6e29 &gt;= @Temperature THEN 1 ELSE 0 END))\n+\tdbo.LOG_FACT(SUM(CASE WHEN T.\u65e5\u6700\u9ad8\u6c17\u6e29 &lt;  @Temperature THEN 1 ELSE 0 END))\n-\tdbo.LOG_FACT(SUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] &gt; 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &gt;= @Temperature THEN 1 ELSE 0 END))\n-\tdbo.LOG_FACT(SUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] = 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &gt;= @Temperature THEN 1 ELSE 0 END))\n-\tdbo.LOG_FACT(SUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] &gt; 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &lt;  @Temperature THEN 1 ELSE 0 END))\n-\tdbo.LOG_FACT(SUM(CASE WHEN E.[\u50b7\u75c5\u7a0b\u5ea6\uff1a\u6b7b\u4ea1] = 0 AND T.\u65e5\u6700\u9ad8\u6c17\u6e29 &lt;  @Temperature THEN 1 ELSE 0 END))\n-\tdbo.LOG_FACT(COUNT(*)))\t\tAS 'Fisher'\nFROM\tdbo.T_HeatStroke\tAS E\nINNER JOIN\tdbo.T_MaxTemperature\tAS T\nON\tE.\u65e5\u4ed8 = T.\u5e74\u6708\u65e5\nAND\tE.\u90fd\u9053\u5e9c\u770c\u30b3\u30fc\u30c9 = T.\u90fd\u9053\u5e9c\u770c\u30b3\u30fc\u30c9\nEND<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u968e\u4e57\u306e\u81ea\u7136\u5bfe\u6570\u3092\u6c42\u3081\u308b\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\u3092SQL Server\u3067\u4f5c\u6210\u3059\u308b\u3092\u8a18\u8ff0\u3057\u305f\uff0e\u4eca\u56de\u306f\u305d\u306e\u30e6\u30fc\u30b6\u30fc\u5b9a\u7fa9\u95a2\u6570\u3092\u7528\u3044\u3066Fisher\u306e\u76f4\u63a5\u78ba\u7387\u3092\u6c42\u3081\u308b\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3092\u8a18\u8ff0\u3059\u308b\uff0e<\/p>\n","protected":false},"author":1,"featured_media":15391,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[11886,11223,5659,11218,6372,3561,3562,11871,11864,651,4673,4000,6743,11872,3962,4672,6389,2872,3560,3557,3574,11876,11211,4354,661,2893,11865,4422,11878,11879,11230,11880,684],"class_list":["post-15412","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-alter-procedure","tag-begin","tag-case","tag-create-procedure","tag-dbo","tag-else","tag-end","tag-exp","tag-fischer","tag-fisher","tag-from","tag-inner-join","tag-int","tag-ln","tag-log","tag-select","tag-sum","tag-t-sql","tag-then","tag-when","tag-3574","tag-11876","tag-11211","tag-4354","tag-661","tag-2893","tag-11865","tag-4422","tag-11878","tag-11879","tag-11230","tag-11880","tag-684"],"_links":{"self":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/15412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15412"}],"version-history":[{"count":10,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/15412\/revisions"}],"predecessor-version":[{"id":15536,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/15412\/revisions\/15536"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/media\/15391"}],"wp:attachment":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}