labels.labelstable which has the following schema:
labels.get(address bytea, type text default null) RETURNS text
addressyou can use
labels.get(address)to get all labels for that address independent of label type. If you want to see labels of the type
owneryou can do
labels.get(address, 'owner'). You can also pass this function several label types you want included like:
labels.get(address, 'owner', 'project').
labels.url(address bytea). Pass that function an address from your query and your results table will contain a clickable link to for instance:
We encourage you to run these queries in Dune while you read this
Note: In the examples below
---represents lines removed, and
labels.getaccepts an optional list of type names which filter the type of labels you get. Say you’re only interested in ‘activity’ labels:
labels.urlto make the addresses clickable:
labels.get, because it can be slow to operate with. Instead you’ll use the fantastic
EXISTSfunction in SQL.
labels.getin addition to the