<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Hi Pietro,<br><br>Thank you for your response. Sure, I will try below to add some sample data that illustrates what I am trying to do. I have a "votes" table which has a vote for each county (A versus B). This can be joined by a responseid to a table "response", which has the date in which the votes were submitted. Also, countyid references my geometry in a separate table. In summary, the first thing I would like to do is count the number of votes for 'A', and count the number of votes for 'B', both per county and based upon a user entered datesubmitted range; And then symbolize my map based upon these results. Also, and I guess ideally, I'd like to also produce a percentage of votes for 'A', per county, based upon the total votes for A and B for each county. And then color code my counties based upon this percentage.<br><br>Thank you for help you may provide.<br><br>Scott<br><br>Below is some sample data:<br><br>votes table:<br><br>countyid;vote;responseid<br>1;"B";"296532B5A40C493592C9E6B480E15E37"<br>2;"A";"296532B5A40C493592C9E6B480E15E37"<br>3;"B";"296532B5A40C493592C9E6B480E15E37"<br>4;"B";"296532B5A40C493592C9E6B480E15E37"<br>5;"B";"296532B5A40C493592C9E6B480E15E37"<br>6;"B";"296532B5A40C493592C9E6B480E15E37"<br>7;"B";"296532B5A40C493592C9E6B480E15E37"<br>8;"B";"296532B5A40C493592C9E6B480E15E37"<br>9;"A";"296532B5A40C493592C9E6B480E15E37"<br>10;"B";"296532B5A40C493592C9E6B480E15E37"<br>11;"B";"296532B5A40C493592C9E6B480E15E37"<br>12;"B";"296532B5A40C493592C9E6B480E15E37"<br>13;"B";"296532B5A40C493592C9E6B480E15E37"<br>14;"A";"296532B5A40C493592C9E6B480E15E37"<br>15;"B";"296532B5A40C493592C9E6B480E15E37"<br>16;"B";"296532B5A40C493592C9E6B480E15E37"<br>17;"B";"296532B5A40C493592C9E6B480E15E37"<br>18;"B";"296532B5A40C493592C9E6B480E15E37"<br>19;"B";"296532B5A40C493592C9E6B480E15E37"<br>20;"B";"296532B5A40C493592C9E6B480E15E37"<br>21;"B";"296532B5A40C493592C9E6B480E15E37"<br>22;"B";"296532B5A40C493592C9E6B480E15E37"<br>23;"A";"296532B5A40C493592C9E6B480E15E37"<br>24;"A";"296532B5A40C493592C9E6B480E15E37"<br>25;"A";"296532B5A40C493592C9E6B480E15E37"<br>26;"A";"296532B5A40C493592C9E6B480E15E37"<br>27;"B";"296532B5A40C493592C9E6B480E15E37"<br>28;"B";"296532B5A40C493592C9E6B480E15E37"<br>29;"B";"296532B5A40C493592C9E6B480E15E37"<br>30;"A";"296532B5A40C493592C9E6B480E15E37"<br>31;"B";"296532B5A40C493592C9E6B480E15E37"<br>32;"B";"296532B5A40C493592C9E6B480E15E37"<br>33;"B";"296532B5A40C493592C9E6B480E15E37"<br>34;"B";"296532B5A40C493592C9E6B480E15E37"<br>35;"A";"296532B5A40C493592C9E6B480E15E37"<br>36;"B";"296532B5A40C493592C9E6B480E15E37"<br>37;"A";"296532B5A40C493592C9E6B480E15E37"<br>38;"B";"296532B5A40C493592C9E6B480E15E37"<br>39;"A";"296532B5A40C493592C9E6B480E15E37"<br>40;"A";"296532B5A40C493592C9E6B480E15E37"<br>41;"B";"296532B5A40C493592C9E6B480E15E37"<br>42;"B";"296532B5A40C493592C9E6B480E15E37"<br>43;"A";"296532B5A40C493592C9E6B480E15E37"<br>44;"B";"296532B5A40C493592C9E6B480E15E37"<br>45;"B";"296532B5A40C493592C9E6B480E15E37"<br>46;"A";"296532B5A40C493592C9E6B480E15E37"<br>47;"B";"296532B5A40C493592C9E6B480E15E37"<br>48;"B";"296532B5A40C493592C9E6B480E15E37"<br>49;"B";"296532B5A40C493592C9E6B480E15E37"<br>50;"B";"296532B5A40C493592C9E6B480E15E37"<br>51;"A";"296532B5A40C493592C9E6B480E15E37"<br>52;"B";"296532B5A40C493592C9E6B480E15E37"<br>53;"B";"296532B5A40C493592C9E6B480E15E37"<br>54;"B";"296532B5A40C493592C9E6B480E15E37"<br>55;"B";"296532B5A40C493592C9E6B480E15E37"<br>56;"B";"296532B5A40C493592C9E6B480E15E37"<br>57;"B";"296532B5A40C493592C9E6B480E15E37"<br>58;"B";"296532B5A40C493592C9E6B480E15E37"<br>59;"B";"296532B5A40C493592C9E6B480E15E37"<br>60;"B";"296532B5A40C493592C9E6B480E15E37"<br>61;"B";"296532B5A40C493592C9E6B480E15E37"<br>62;"B";"296532B5A40C493592C9E6B480E15E37"<br>63;"A";"296532B5A40C493592C9E6B480E15E37"<br>64;"B";"296532B5A40C493592C9E6B480E15E37"<br>65;"B";"296532B5A40C493592C9E6B480E15E37"<br>66;"B";"296532B5A40C493592C9E6B480E15E37"<br>67;"B";"296532B5A40C493592C9E6B480E15E37"<br>1;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>2;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>3;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>4;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>5;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>6;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>7;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>8;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>9;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>10;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>11;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>12;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>13;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>14;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>15;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>16;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>17;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>18;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>19;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>20;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>21;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>22;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>23;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>24;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>25;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>26;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>27;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>28;"B";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>29;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>30;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>31;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>32;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br>33;"A";"AE2E9A609C65420A9DDF37A9E56A25A8"<br><br><br>response table:<br><br>responseid;datesubmitted<br>"296532B5A40C493592C9E6B480E15E37";"2008-10-13 18:27:28-04"<br>"AE2E9A609C65420A9DDF37A9E56A25A8";"2008-10-14 14:01:59-04"<br>"24165287C9D94F9CA9F6C6BBDEB4622B";"2008-10-13 14:52:40-04"<br><br></div><br><div>
<div>********************************************* </div>Scott Pezanowski 
<div></div>
<div></div>
<div></div>email: scottpez@hotmail.com  
<div></div>*********************************************</div><br><br><hr id="stopSpelling">> Date: Thu, 30 Oct 2008 11:22:48 +0100<br>> Subject: Re: [mapserver-users] symbolize a wms map based upon a sql count()      query<br>> From: pgiannini@bytewise.it<br>> To: mapserver-users@lists.osgeo.org<br>> CC: scottpez@hotmail.com<br>> <br>> Maybe a view on postresql, with both count and geometry?<br>> can you pls post a little sample data?<br>> ciao<br>> ............................pg<br>> <br>> -- <br>> Pietro Giannini<br>> Bytewise srl - Area GIS<br>> 41°50'38.58"N 12°29'13.39"E<br>> <br>> <br>> <br>> On Gio, Ottobre 30, 2008 03:52, Scott Pezanowski wrote:<br>> > Hi,<br>> ><br>> > I am hoping to be able to symbolize a WMS or image map, based upon the<br>> > results of a SQL COUNT() query. To be more specific, this query needs to<br>> > be dynamic based upon user input from my application for specific<br>> > attributes in the data, count up the number of records that meet that<br>> > query, and then produce a choropleth map of the resulting counts. So the<br>> > query would produce, a count of 10 records for one county, 5 records for<br>> > another county, etc. and my counties will be colored based upon a scheme<br>> > for these counts. My data is in a PostGIS database.<br>> ><br>> > Is there a way to do this with Mapserver? I am currently simply returning<br>> > all of the records that meet my criteria and counting things up on the<br>> > client application. But I am hoping there is a way to do this on the<br>> > server or database-side of things.<br>> ><br>> > Thank you very much in advance for any help or tips you may be able to<br>> > offer. Also, please let me know if you need more info on what I am trying<br>> > to do.<br>> ><br>> > Thanks,<br>> > Scott<br>> ><br>> ><br>> ><br>> ><br>> > ********************************************* Scott Pezanowski<br>> ><br>> ><br>> > email: scottpez@hotmail.com<br>> > *********************************************<br>> > _______________________________________________<br>> > mapserver-users mailing list<br>> > mapserver-users@lists.osgeo.org<br>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users<br>> ><br>> <br></body>
</html>