Carry out the following steps to run the data store query:
- Navigate to File | Run Datastore Query. Choose the PostGIS connection from the Connection drop-down menu or use the Connection Manager utility if you are not linked to the database.
- We'll create and name a polygon layer of the main streams in the region by executing the following query:
SELECT gid, ST_BUFFER("chp11".lines.geom_sp, 75) AS the_geom, fullname FROM "chp11".lines WHERE fullname <> '' AND hydroflg = 'Y'
The preceding query is shown in the following screenshot:
The preceding query selects the lines on the map that represent hydrology units such as "hydroflg" ...