Query Interface Guide

Master the RadishKit data query web interface for executing and managing SQL queries

The RadishKit data query interface provides a powerful, user-friendly way to execute SQL queries against your Accela database. This guide will help you master all the interface features and capabilities.

Accessing the Query Interface

Step 1: Navigate to Data Queries

  1. Go to your agency workspace
  2. Click "Data Queries" in the sidebar
  3. You'll see the query interface with a clean, modern design

Step 2: Select Your Environment

Before running queries, select the environment you want to query:

  1. Click the environment dropdown at the top
  2. Select your target environment (TEST, PROD, etc.)
  3. Verify the connection status is active

Interface Overview

Main Components

The query interface consists of several key areas:

  • Query Editor - Where you write your SQL queries
  • Results Panel - Displays query results
  • Query History - Shows previously executed queries
  • Saved Queries - Access to saved queries
  • Export Options - Download results in various formats

Query Editor

The query editor provides:

  • Syntax highlighting - SQL keywords are highlighted
  • Auto-completion - Suggestions for table and column names
  • Error highlighting - Visual indicators for syntax errors
  • Line numbers - Easy navigation in large queries
  • Multiple tabs - Work on multiple queries simultaneously

Results Panel

Query results are displayed in a table format with:

  • Sortable columns - Click column headers to sort
  • Searchable results - Search within result data
  • Pagination - Navigate through large result sets
  • Column resizing - Adjust column widths as needed

Writing Queries

Basic Query Structure

Start with simple queries to test your connection:

-- Test connection
SELECT TOP 10 * FROM records

-- Get specific data
SELECT record_id, status, created_date 
FROM records 
WHERE status = 'Active'

Using the Query Editor

  1. Click in the query editor to start typing
  2. Use auto-completion - Type table names and press Tab
  3. Check syntax - Look for error highlighting
  4. Format your query - Use proper indentation and spacing

Query Templates

The interface provides common query templates:

  • Record queries - Basic record selection
  • User queries - User and activity data
  • Status queries - Records by status
  • Date range queries - Records within date ranges

Executing Queries

Running a Query

  1. Write your query in the editor
  2. Click "Execute" or press Ctrl+Enter
  3. Wait for results - The interface shows execution progress
  4. Review results - Check the results panel

Query Execution Options

  • Execute - Run the query normally
  • Execute with limit - Automatically add TOP 1000
  • Validate only - Check syntax without executing
  • Explain plan - Show query execution plan

Understanding Results

Query results include:

  • Data table - Your query results
  • Row count - Total number of results
  • Execution time - How long the query took
  • Column information - Data types and properties

Managing Queries

Saving Queries

Save frequently used queries for future use:

  1. Write your query in the editor
  2. Click "Save Query" button
  3. Enter a name and description
  4. Choose a category for organization
  5. Click "Save" to store the query

Organizing Queries

Organize your queries by:

  • Category - Group related queries together
  • Department - Organize by business function
  • Frequency - Mark frequently used queries
  • Date - Sort by creation or last used date

Sharing Queries

Share queries with your team:

  1. Select a saved query
  2. Click "Share" button
  3. Choose sharing options:
    • Team members - Share with specific people
    • Public - Make available to all team members
    • Read-only - Prevent modifications

Advanced Features

Query Parameters

Use parameters in your queries for flexibility:

-- Parameterized query
SELECT * FROM records 
WHERE status = @status
  AND created_date >= @start_date
  AND created_date <= @end_date

Setting parameters:

  1. Write your query with parameter placeholders
  2. Click "Set Parameters" button
  3. Enter parameter values
  4. Execute the query

Query History

Track all executed queries:

  • Execution history - See all queries you've run
  • Performance metrics - Track execution times
  • Result counts - See how many rows were returned
  • Error tracking - Review failed queries

Export Options

Export query results in various formats:

  • CSV - Comma-separated values
  • Excel - Microsoft Excel format
  • JSON - JavaScript Object Notation
  • PDF - Portable Document Format

Best Practices

Query Writing

  • Use descriptive names - Name your queries clearly
  • Add comments - Document what your queries do
  • Format consistently - Use proper indentation and spacing
  • Test incrementally - Build complex queries step by step

Performance

  • Start small - Test with TOP 10 or LIMIT clauses
  • Use WHERE clauses - Filter data to reduce result sets
  • Check execution time - Monitor query performance
  • Optimize complex queries - Break down large queries

Organization

  • Group related queries - Use categories effectively
  • Document purpose - Add descriptions to saved queries
  • Version control - Track changes to important queries
  • Clean up - Remove unused or outdated queries

Troubleshooting

Common Issues

Query timeout:

  • Add WHERE clauses to limit data
  • Use TOP/LIMIT to reduce result sets
  • Check for missing indexes
  • Optimize complex joins

Permission errors:

  • Check your user permissions
  • Verify table access rights
  • Contact your database administrator

Syntax errors:

  • Check SQL syntax carefully
  • Verify table and column names
  • Test with simpler queries first

Connection issues:

  • Verify environment selection
  • Check network connectivity
  • Contact support if needed

Getting Help

For interface issues:

  • Check error messages - Look for specific error details
  • Test with simple queries - Start with basic SELECT statements
  • Review documentation - Check Accela database documentation
  • Contact support - aaron@radishapps.com

Keyboard Shortcuts

Editor Shortcuts

  • Ctrl+Enter - Execute query
  • Ctrl+S - Save query
  • Ctrl+Z - Undo
  • Ctrl+Y - Redo
  • Ctrl+F - Find in query
  • Ctrl+H - Find and replace
  • Tab - Move to next field
  • Shift+Tab - Move to previous field
  • Ctrl+Tab - Switch between query tabs
  • Ctrl+W - Close current tab

Next Steps

Now that you understand the query interface:

  1. Advanced Queries - Learn complex query techniques
  2. Query Management - Organize and share queries
  3. Performance Optimization - Optimize query performance
  4. CLI Integration - Use SQL queries with the CLI