---
title: Custom queries
description: "Create data tables from custom queries (requires a premium license). ## Supports - Any SQL query (that results in a table. Commands that don't result in a table are not applicable.) - Global search - Search Panes - Search Builder…"
url: "https://docs.legacy.wpdataaccess.com/docs/custom-queries/"
updated: "2025-11-23"
category: Legacy Tools / Tables / Advanced Features
---

# Custom queries

Create data tables from custom queries (requires a premium license).

## Supports

- Any SQL query (that results in a table. Commands that don't result in a table are not applicable.)
- Global search
- Search Panes
- Search Builder
- Export and custom buttons
- Advanced options

  [![](https://wpdataaccess.com/wp-content/uploads/2022/04/custom-query.png)](https://wpdataaccess.com/wp-content/uploads/2022/04/custom-query.png)

## Usage

- In Data Tables
- Select **Custom query** in **Publication Data** panel
- Enter SQL query or use the **Query Builder** button to select an existing query
- Save

## Inline demo

Here is the result from the custom query above.

| Department | #Employees | Total Salary | Average Salary |
| --- | --- | --- | --- |
| Department | #Employees | Total Salary | Average Salary |
