user6918: What is the best way (or perhaps only way) to query db-sync for transactions involving a specific policy?

user5926: Since you mention "policy" it means you are only interested in multi asset transactions which are all contained in the ma_tx_out table.
However, you need to be aware that multiple assets can have the same policy. If this is what you want, the query would be:
select ma_tx_out.* from ma_tx_out inner join multi_asset
  on ma_tx_out.ident = multi_asset.id
  where multi_asset.policy = '\x....' ;

If instead you want all transaction for the same multi-asset then the query would be:
select * from ma_tx_out.ident = ? ;


6918: <p>What is the best way (or perhaps only way) to query db-sync for transactions involving a specific policy?</p>
 5926: <p>Since you mention &quot;policy&quot; it means you are only interested in multi asset transactions which are all contained in the <code>ma_tx_out</code> table.</p>
<p>However, you need to be aware that multiple assets can have the same policy. If this is what you want, the query would be:</p>
<pre><code>select ma_tx_out.* from ma_tx_out inner join multi_asset
  on ma_tx_out.ident = multi_asset.id
  where multi_asset.policy = '\x....' ;
</code></pre>
<p>If instead you want all transaction for the same multi-asset then the query would be:</p>
<pre><code>select * from ma_tx_out.ident = ? ;
</code></pre>
