Dear all,<div><br></div><div>I have loaded two shape files into postgis database.</div><div>I am using the ST_Intersects(geom of shape file1, geom of shape file2) command to see the features that interesects.</div><div>Now there are redundant entries created in the table.</div>
<div>I want to pick the unique tuple where the attribute "area" has the maximum value.</div><div>for ex. the following is a outcome of doing the intersects operation on the two tables.</div><div><br></div><div>plot_id              area            </div>
<div>--------------------------------</div><div>S01BAT009      23</div><div>S01BAT009      20</div><div>S01BAT009      19</div><div>S01BAA001      10</div><div>S01BAA001      12</div><div>S01BAA001      30</div><div><br></div>
<div>I want to select </div><div><br></div><div>plot_id               area</div><div>-------------------------------</div><div>S01BAT009        23 </div><div>S01BAA001       30 </div><div><br></div><div>from the above table. </div>
<div><br></div><div>How do i write the query please help.</div><div><br></div><div>thank you</div><div><br></div><div>-- <br>shreyes shiv<br>email: <a href="mailto:shivshreyes@gmail.com">shivshreyes@gmail.com</a><br>phone: 9557975780<br>
IIRS(Indian Institute of Remote Sensing)<br>No. 4, Kalidas Road, Dehradun-248001, Uttarakhand, India<br>
</div>