3. Query Block - Where


”Where” section is used when you want to apply specific conditions to your query and view summary results for specific addresses, tokens, etc.

How to use

  1. Basic Options

    1. First, select the column that you want to add the filter to. and specify the conditions to apply the filter.

    2. To select columns, you can either select the desired column from the drop-down list that appears when you click the input box, or you can drag the column from the left pane and drop it in the where section.

    3. Once a column has been added, you can select a filter from the list of Basic Filters. This list offers a range of basic filter options, including Greater than, Equal to, In, Is empty, Not empty, Contains, and Between.

    4. Finally, the parameters are entered to complete the conditional expression. The number of parameters required depends on the selected filter, ranging from 0 to 2. Once all parameters are entered, the "where" clause is completed.

  2. Adding another Where

    1. Additionally, you can add another condition by either clicking the "+where" button to add multiple filters, or by dragging another column to the "where" section, which will automatically create another filter.

    2. You can then choose between using an AND or OR operator for the filters.

  3. Custom expression

    1. If you want to use more complex filters, you can click on "Custom expression" at the bottom of the drop-down, and an input field will appear. Here, you can apply filters based on multiple columns or the results of applying arithmetic operations to columns. All queries that are available in BigQuery SQL can be used in this field.

Filter with Metadata

When applying filters, not only can you use data from the original table, but you can also use metadata information. For example, you can retrieve labeling information for a particular address from metadata and use it in your filter conditions.

How to use

  1. Select the column you want to apply the filter to, then choose "Filter with Metadata" from the condition dropdown to utilize both the data and metadata information in the original table.

  2. When you select "Filter with Metadata" in the condition drop-down, an input field will appear that allows you to choose which metadata field to match with, following the "matching with" keyword.

    For example, if the column you want to filter is related to Ethereum addresses, select 'Ethereum Address' in the metadata.

  3. After selecting the matching field, you can enter the filter condition. For example, if you want to filter by the label name of an address, select 'Address Name' and enter the specific condition. For instance, you can enter a condition such as 'Address Name contains Binance'.

Last updated