labels.labels
table which has the following schema:labels.get(address bytea, type text default null) RETURNS text[]
address
you 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 owner
you 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
trader_a
column to labels.get(trader_a)
.Note: In the examples below---
represents lines removed, and+++
lines added.
labels.get
accepts an optional list of type names which filter the type of labels you get. Say you’re only interested in ‘activity’ labels:labels.url
to make the addresses clickable:labels.get
, because it can be slow to operate with. Instead you’ll use the fantastic EXISTS
function in SQL.labels.get
in addition to the WHERE EXISTS
pattern: