Skip to content
>_ SQL Query Builder

Visual Query Builder

The Visual Query Builder is a feature designed to help plugin users with little or no SQL knowledge write SQL queries using an intuitive graphical user interface.

Creating a Visual Query

To launch the graphical interface, select New + Private Visual Query or New + Global Visual Query.

WP Data Access - Visual Query Builder

Open a Visual Query

When you open a query that was created with the previous version of the Visual Query Builder, a confirmation dialog will appear. Once confirmed, the query is automatically converted to the new format. Existing Visual Queries created in the current version will open directly in the builder without any additional steps.

Writing a Visual Query

  • Click the Add Table or View button to add a table or view to the canvas.
  • After adding a table or view, click the Execute button to display all rows from the selected table.

Selecting columns

  • Enable the checkboxes next to the columns you want to include in your selection.
  • Use the plus icon (+) next to a column name to add the same column multiple times—useful when performing multiple calculations on a single column.
  • Drag and drop columns to reorder them in your selection.
  • Enable Sorting to order your output based on a column's values.
  • Enable Grouping to group your data by specific columns.

Adding filters

  • Start by adding a filter group.
  • Then add at least one filter condition to that group.
  • Filter groups can also contain other filter groups, allowing you to create nested AND and OR conditions for complex filtering logic.

Relationships

  • Click the circle icon next to a column to select it as the source column.
  • Click the circle icon next to another column to select it as the destination column.
  • This action creates an INNER JOIN between the two columns.
  • To modify the join type or relationship settings, click the relationship circle icon between the connected columns.