File size: 5,241 Bytes
68eb98f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
<html><head>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
h1 { text-align: center; }
.cot-title { color: blue; }
.pos-title { color: green; }
h2 { color: black; text-align: left; }
h3 { color: black; text-align: left; }
h4 { color: darkslategray; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
table, th, td { border: 1px solid #ddd; padding: 8px; }
th { background-color: #f2f2f2; }
tr:nth-child(even) { background-color: #f9f9f9; }
.highlight { background-color: #ffffcc; }
.true { color: green; }
.false { color: red; }
.highlighted-cell { background-color: yellow; cursor: pointer; }
.step-title { background-color: #f1f1f1; color: #444; padding: 10px; margin: 10px 0; font-size: 18px; border-left: 4px solid #888; }
.step { display: block; }
.sql-command { background-color: #f0f0f0; padding: 10px; border-left: 4px solid #4CAF50; font-family: monospace; white-space: pre-wrap; }
</style>
</head><body>
<hr>
<h3><span>Statement:</span> the 1977 , 1978 and 1989 seasons each have less than 26 points , more than 18 games , and exactly 13 losses</h3>
<h3>Input Table: coquitlam adanacs</h3>
<div class="step">
<table>
<tr><td>season</td><td>team_name</td><td>games</td><td>losses</td><td>points</td></tr><tr><td>1965</td><td>coquitlam adanacs</td><td>30</td><td>18</td><td>24</td></tr><tr><td>1966</td><td>coquitlam adanacs</td><td>30</td><td>11</td><td>38</td></tr><tr><td>1967</td><td>coquitlam adanacs</td><td>30</td><td>15</td><td>29</td></tr><tr><td>1968</td><td>portland adanacs</td><td>38</td><td>14</td><td>48</td></tr><tr><td>1969</td><td>coquitlam adanacs</td><td>29</td><td>3</td><td>52</td></tr><tr><td>1970</td><td>coquitlam adanacs</td><td>30</td><td>16</td><td>28</td></tr><tr><td>1971</td><td>coquitlam adanacs</td><td>31</td><td>12</td><td>37</td></tr><tr><td>1972</td><td>coquitlam adanacs</td><td>36</td><td>23</td><td>18</td></tr><tr><td>1973</td><td>coquitlam adanacs</td><td>25</td><td>9</td><td>32</td></tr><tr><td>1974</td><td>coquitlam adanacs</td><td>24</td><td>15</td><td>17</td></tr><tr><td>1975</td><td>coquitlam adanacs</td><td>24</td><td>16</td><td>16</td></tr><tr><td>1976</td><td>coquitlam adanacs</td><td>24</td><td>15</td><td>18</td></tr><tr><td>1977</td><td>coquitlam adanacs</td><td>24</td><td>13</td><td>22</td></tr><tr><td>1978</td><td>coquitlam adanacs</td><td>24</td><td>13</td><td>21</td></tr><tr><td>1979</td><td>coquitlam adanacs</td><td>30</td><td>12</td><td>35</td></tr><tr><td>1980</td><td>coquitlam adanacs</td><td>24</td><td>9</td><td>30</td></tr><tr><td>1981</td><td>coquitlam adanacs</td><td>24</td><td>7</td><td>34</td></tr><tr><td>1982</td><td>coquitlam adanacs</td><td>24</td><td>16</td><td>16</td></tr><tr><td>1983</td><td>coquitlam adanacs</td><td>24</td><td>14</td><td>20</td></tr><tr><td>1984</td><td>coquitlam adanacs</td><td>24</td><td>14</td><td>20</td></tr><tr><td>1985</td><td>coquitlam adanacs</td><td>24</td><td>10</td><td>28</td></tr><tr><td>1986</td><td>coquitlam adanacs</td><td>24</td><td>14</td><td>20</td></tr><tr><td>1987</td><td>coquitlam adanacs</td><td>24</td><td>11</td><td>26</td></tr><tr><td>1988</td><td>coquitlam adanacs</td><td>24</td><td>11</td><td>26</td></tr><tr><td>1989</td><td>coquitlam adanacs</td><td>24</td><td>13</td><td>22</td></tr><tr><td>1990</td><td>coquitlam adanacs</td><td>24</td><td>18</td><td>12</td></tr><tr><td>1991</td><td>coquitlam adanacs</td><td>24</td><td>6</td><td>36</td></tr><tr><td>1992</td><td>coquitlam adanacs</td><td>24</td><td>14</td><td>20</td></tr><tr><td>1993</td><td>coquitlam adanacs</td><td>23</td><td>6</td><td>34</td></tr><tr><td>1994</td><td>coquitlam adanacs</td><td>20</td><td>7</td><td>26</td></tr><tr><td>1995</td><td>coquitlam adanacs</td><td>25</td><td>11</td><td>25</td></tr><tr><td>1996</td><td>coquitlam adanacs</td><td>20</td><td>15</td><td>10</td></tr><tr><td>1997</td><td>coquitlam adanacs</td><td>20</td><td>10</td><td>19</td></tr><tr><td>1998</td><td>coquitlam adanacs</td><td>25</td><td>9</td><td>31</td></tr><tr><td>1999</td><td>coquitlam adanacs</td><td>25</td><td>7</td><td>36</td></tr><tr><td>2000</td><td>coquitlam adanacs</td><td>25</td><td>11</td><td>28</td></tr><tr><td>2001</td><td>coquitlam adanacs</td><td>20</td><td>8</td><td>24</td></tr><tr><td>2002</td><td>coquitlam adanacs</td><td>20</td><td>6</td><td>27</td></tr><tr><td>2003</td><td>coquitlam adanacs</td><td>20</td><td>3</td><td>34</td></tr><tr><td>2004</td><td>coquitlam adanacs</td><td>20</td><td>9</td><td>22</td></tr><tr><td>2005</td><td>coquitlam adanacs</td><td>18</td><td>4</td><td>27</td></tr><tr><td>2006</td><td>coquitlam adanacs</td><td>18</td><td>6</td><td>23</td></tr><tr><td>2007</td><td>coquitlam adanacs</td><td>18</td><td>7</td><td>20</td></tr><tr><td>2008</td><td>coquitlam adanacs</td><td>18</td><td>3</td><td>28</td></tr><tr><td>2009</td><td>coquitlam adanacs</td><td>18</td><td>9</td><td>18</td></tr><tr><td>total</td><td>45 seasons</td><td>1094</td><td>493</td><td>1177</td></tr>
</table>
</div>
<h3>SQL Command:</h3>
<div class="sql-command">SELECT
CASE
WHEN (SELECT COUNT(*) FROM table_sql WHERE season IN (1977, 1978, 1989) AND points < 26 AND games > 18 AND losses = 13) = 3
THEN 'TRUE'
ELSE 'FALSE'
END;</div>
</body></html>
|