PostGIS – Distinct Values

Marketing
Marketing
  • Updated

By David Crowther

PostGIS___Distinct_Values_-_1.JPG

Question:

How can you identify Distinct Values in a Column in PostGIS?

Answer:

If you wish to identify the Distinct/Unique values in a column of data in a PostGIS table, use the following SQL statement in a Query Window:

PostGIS___Distinct_Values_-_2.JPG

Simply replace:

  • columnname – with the field in the PostGIS Table
  • schema – with the schema in the database that the Table is stored
  • tablename – with the table name

If you now Run the query all the Distinct Values in the defined column will be shown:

PostGIS___Distinct_Values_-_3.JPG

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.