一致する列が4つ以上ある場合は、10列のうちプレーヤーがキーであるプレイヤーをすべて選択します。たとえば、col1、col2、col3、col4が一致する場合は、同じ列のすべてのユーザーをリストしますが、col1、col5、col4、およびcol8が一致する場合は、同じ列のすべてのユーザーもリストします。だから、基本的にCOL1 = COL1またはcol8 = col8ディスプレイならば、プレイヤーが一致する列4列以上の一致する値を持つプレイヤーを選択
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>logs</title>
<meta name="GENERATOR" content="HeidiSQL 9.4.0.5125">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
thead tr {background-color: ActiveCaption; color: CaptionText;}
th, td {vertical-align: top; font-family: "Tahoma", Arial, Helvetica, sans-serif; font-size: 8pt; padding: 3px; }
table, td {border: 1px solid silver;}
table {border-collapse: collapse;}
thead .col0 {width: 148px;}
thead .col1 {width: 300px;}
thead .col2 {width: 239px;}
thead .col3 {width: 173px;}
thead .col4 {width: 133px;}
thead .col5 {width: 107px;}
thead .col6 {width: 231px;}
thead .col7 {width: 268px;}
thead .col8 {width: 281px;}
</style>
</head>
<body>
<table caption="logs (7 rows)">
<thead>
<tr>
<th class="col0">user</th>
<th class="col1">gpuid</th>
<th class="col2">cpuid</th>
<th class="col3">winkey</th>
<th class="col4">desktopname</th>
<th class="col5">windowsuser</th>
<th class="col6">bios</th>
<th class="col7">processor</th>
<th class="col8">video</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col0">test1</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
<tr>
<td class="col0">test2</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
<tr>
<td class="col0">test3</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
<tr>
<td class="col0">test4</td>
<td class="col1">d08b4d14ba5a5d296e228b193d7ec25af31a002b949ceb84e603b6e32f5cee80</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00330-80000-00000-AA369</td>
<td class="col4">DESKTOP-E5L9057</td>
<td class="col5">Thom</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz</td>
<td class="col8">NVIDIA GeForce GTX 1080 Ti</td>
</tr>
<tr>
<td class="col0">test5</td>
<td class="col1">74421b33c2ececc0e9873acdc72f0f72dcbc6064b2fedea9590b28088b730e8f</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00330-80000-00000-AA682</td>
<td class="col4">DESKTOP-412N9PE</td>
<td class="col5">Skyler</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz</td>
<td class="col8">AMD Radeon R9 200 Series</td>
</tr>
<tr>
<td class="col0">test6</td>
<td class="col1">9fc2b8069c6c7cf3ff0ba01e93feeab14783345485a913e69462ee40d329f454</td>
<td class="col2">6-1752462657-1145913699-1769238117</td>
<td class="col3">00326-30000-00001-AA636</td>
<td class="col4">DESKTOP-5PQDFP3</td>
<td class="col5">Aiden</td>
<td class="col6">HPQOEM - 1072009</td>
<td class="col7">AMD A6-3650 APU with Radeon(tm) HD Graphics</td>
<td class="col8">NVIDIA GeForce GTX 750 Ti</td>
</tr>
<tr>
<td class="col0">truix</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
</tbody>
</table>
</body>
</html>
を持つユーザ他のプレイヤーとの少なくとも4つの一致する列に関係なく持っていると私は返すようにしたいならば
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>logs</title>
<meta name="GENERATOR" content="HeidiSQL 9.4.0.5125">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
thead tr {background-color: ActiveCaption; color: CaptionText;}
th, td {vertical-align: top; font-family: "Tahoma", Arial, Helvetica, sans-serif; font-size: 8pt; padding: 3px; }
table, td {border: 1px solid silver;}
table {border-collapse: collapse;}
thead .col0 {width: 148px;}
thead .col1 {width: 300px;}
thead .col2 {width: 239px;}
thead .col3 {width: 173px;}
thead .col4 {width: 133px;}
thead .col5 {width: 107px;}
thead .col6 {width: 231px;}
thead .col7 {width: 268px;}
thead .col8 {width: 281px;}
</style>
</head>
<body>
<table caption="logs (4 rows)">
<thead>
<tr>
<th class="col0">user</th>
<th class="col1">gpuid</th>
<th class="col2">cpuid</th>
<th class="col3">winkey</th>
<th class="col4">desktopname</th>
<th class="col5">windowsuser</th>
<th class="col6">bios</th>
<th class="col7">processor</th>
<th class="col8">video</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col0">test1</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
<tr>
<td class="col0">test2</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
<tr>
<td class="col0">test3</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
<tr>
<td class="col0">truix</td>
<td class="col1">4d73e26e4a60043efcab3f4c2f084fec7b930c80784f2e5affabdab4d68f36f1</td>
<td class="col2">13-1970169159-1818588270-1231384169</td>
<td class="col3">00331-10000-00001-AA429</td>
<td class="col4">TRUIX-DESKTOP</td>
<td class="col5">Truix</td>
<td class="col6">ALASKA - 1072009</td>
<td class="col7">Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz</td>
<td class="col8">NVIDIA GeForce GTX 1070</td>
</tr>
</tbody>
</table>
</body>
</html>
編集ご質問や、サンプルデータと望ましい結果を提供します。 –
@GordonLinoffそれは良いですか? –
'' select col0、col1、col2、col3、col4、col5、col6、col7、((col0 =?)+(col1 =?)+(col2 match_score> = 4であるシステムからのmatch_scoreとして、(col3 =ε)+(col4 =τ)+(col4 =τ)+(col5 =τ)+(col6 =τ)+(col7 =τ)属性。 – Orangepill