[GRASS-SVN] r55673 - grass/branches/releasebranch_6_4/db/base

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 9 09:52:11 PDT 2013


Author: neteler
Date: 2013-04-09 09:52:11 -0700 (Tue, 09 Apr 2013)
New Revision: 55673

Modified:
   grass/branches/releasebranch_6_4/db/base/db.select.html
Log:
db.select: GROUP BY example added

Modified: grass/branches/releasebranch_6_4/db/base/db.select.html
===================================================================
--- grass/branches/releasebranch_6_4/db/base/db.select.html	2013-04-09 12:04:13 UTC (rev 55672)
+++ grass/branches/releasebranch_6_4/db/base/db.select.html	2013-04-09 16:52:11 UTC (rev 55673)
@@ -25,7 +25,8 @@
 
 <em>Select all from table roads</em><br>
 <div class="code"><pre>
-db.select -c driver=odbc database=g51test table=roads input=file.sql > result.csv
+db.select -c driver=odbc database=mydb table=roads \
+          input=file.sql output=result.csv
 </pre></div>
 
 <p>
@@ -49,9 +50,21 @@
 echo "SELECT x(geo),y(geo) FROM localizzazione" | db.select
 </pre></div>
 
+<p>
+
+<em>Count number of cases falling into same position:</em><br>
+When multiple observation have the spatial coordinates, they can still be counted
+(if needed, coordinates can be uploaded to the attribute table by <em>v.to.db</em>:
+<div class="code"><pre> 
+db.select sql="SELECT long,lat,site_id,department,obs,COUNT(long) as count_cases \
+               FROM diseases GROUP BY long,lat"
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
-<em><a href="sql.html">GRASS SQL interface</a>,
+<em>
+<a href="sql.html">GRASS SQL interface</a>,
+<br>
 <a href="db.connect.html">db.connect</a>,
 <a href="db.describe.html">db.describe</a>,
 <a href="db.drivers.html">db.drivers</a>,
@@ -62,7 +75,7 @@
 
 
 <h2>AUTHOR</h2>
-?<br>
+Unknown<br>
 Modifications: Radim Blazek, ITC-Irst, Trento, Italy
 
 <p><i>Last changed: $Date$</i>



More information about the grass-commit mailing list