Queries

Overview

In Analysis > Queries, you can write and execute Logpresso queries directly. For query syntax and command details, refer to the Logpresso Query Documentation.

The current v5 query screen is split into a left-side table-selection area and a right-side tabbed workspace. You can start from selected tables, rerun recent queries, or load saved results and datasets without leaving the page.

In practice, the Queries menu is commonly used for these tasks:

  • Searching raw or normalized data directly
  • Validating query logic before building rules or pivot analysis
  • Reopening saved results or datasets for follow-up investigation

Screen Layout

The screen is broadly divided into a left table tree and a right tab workspace.

Full query screen

Table Tree

The left panel shows table groups and tables.

  • You can select one or more tables from the tree.
  • The Select Tables button at the top applies the selected tables to query preparation.
  • The sidebar can be collapsed and expanded when you need more workspace.
Query Tabs

The upper-right area contains tab navigation.

  • You can add new tabs to work on multiple queries at the same time.
  • Each tab keeps its own execution state and result data.
  • Tabs can be closed individually with the close button.
Query Editor and Execution Area

The selected tab shows a query editor at the top and a result area below it.

  • Run: Executes the current query.
  • Cancel: Stops a running query.
  • Reset: Restores the edited query state.
  • View Query Status: Opens or closes the execution-status panel.
Note
Query tabs can remain available even after you move to another menu and return. Running queries can continue in the same tab context.

Writing Queries

The query editor supports multi-line editing and execution shortcuts.

Query input

  • Commands are chained with pipe (|) separators.
  • The editor expands across multiple lines as the query grows.
  • Lines starting with # are treated as comments.
  • You can run a query with Shift + Enter or Ctrl + Enter.
  • Auto-formatting helps make long queries easier to read.
Auto-Completion

The query editor supports command and option auto-completion.

Command auto-completion

Option auto-completion

  • Open completion suggestions with the following shortcuts:
    • All platforms: Ctrl + Space
    • Windows only: Ctrl + Shift + Space (alternative)
    • macOS only: Cmd + Space (alternative)
  • If the current prefix matches exactly one command or option, it can be inserted immediately.
Note
On macOS, Cmd + Space is assigned to Spotlight Search by default and conflicts with the auto-completion shortcut. Logpresso Sonar shortcuts are not configurable, so reassign Spotlight under System Settings > Keyboard > Keyboard Shortcuts > Spotlight, or use Ctrl + Space instead to avoid the conflict.
Auto Line Wrap

Use the formatting shortcut to make long pipe-based queries easier to inspect.

Before formatting, a long query can remain on a single line and become difficult to read.

Before auto line wrap

Press Ctrl + Shift + F to reformat the query with line breaks based on pipe (|) separators. macOS users press the same combination — the literal Ctrl key, not Cmd.

After auto line wrap

  • This is especially useful before reviewing or editing a long multi-step query.

Select Tables and Table Input

Selecting tables from the left tree helps you build query starting points more quickly.

Select Tables and table input

  • You can use selected tables to build the initial table statement more quickly.
  • Choosing tables first narrows the working scope and reduces mistakes when building table paths.

Run Queries and Review Results

When you run a query, the result grid appears in the lower area of the screen.

Query execution example

  • While the query is running, a Cancel button appears next to the main action area.
  • After execution finishes, the result grid shows the returned records page by page.
  • The header area also shows elapsed time and the action menu for saving or downloading.
Rerun Recent Queries

A new tab without an active result shows a list of recent query history.

Recent queries

  • Clicking an item immediately loads and reruns that query.

Load Saved Data

Before starting a new run, you can reopen saved results or datasets from the load menu.

Load Query Results

Load query results

  • Saved query results are static outputs preserved from the time they were stored.
  • Clicking an item loads that saved result into the workspace.
Load Datasets

Load datasets

  • Datasets are dynamic objects that rerun their saved query definition at load time.
  • The same dataset can return different results depending on time conditions and source data state.

Save and Download Query Results

After a query has been executed, the upper action menu becomes available.

Save as Dataset

Save as dataset

  • This stores the current query definition as a reusable dataset.
  • The saved dataset can later be reused in Datasets, Pivot, widgets, and batch-rule workflows.
Note
Queries saved as datasets are usually easier to reuse when they include time controls such as duration or window together with commands like table, fulltext, or stream.
Save Query Result

Save query result

  • This stores the current execution output as a static saved result.
  • The saved result can later be reopened from Load Query Results.
Download Query Result

Download query result

  • File Name: Name of the export file.
  • Columns: Fields to include in the file.
  • File Format: Choose CSV, Excel XML, Microsoft Word, HTML, JSON, PDF, and similar formats.
  • Encoding: Character encoding for the export.
  • Range: Number of records to include.
  • Split and Zip: Large results can be split into multiple files and downloaded as a ZIP archive.

View Query Execution Status

After execution, you can open a lower status panel to inspect the run in more detail.

Query execution status

  • The actual executed query text
  • Execution time
  • Total elapsed duration
  • Per-step processed record counts

Change the Number of Displayed Rows

You can change page size from the result pager controls.

Change rows per page

  • This lets you show more or fewer records per page in the result grid.