Skip to main content

AI Capabilities

AI-Powered Query Generation

ClickPipes integrates advanced AI capabilities to help you create SQL queries without needing to be a SQL expert. This feature allows anyone in your organization to create powerful data APIs by simply describing what they need in natural language.

How It Works

  1. Describe Your Data Need: Enter a natural language description of the data you want
  2. AI Generates SQL: Our AI system analyzes your description and generates the appropriate SQL query
  3. Review and Refine: Review the generated SQL, make adjustments if needed
  4. Create API: Use the generated SQL to create your Data API

Example Use Cases

Business Analysts

"Show me the top 10 customers by revenue for each region in the last quarter, with year-over-year growth"

Marketing Teams

"List all products where sales increased after our latest marketing campaign, grouped by campaign channel"

Executive Dashboards

"Provide daily active users, revenue, and conversion rate for the last 30 days compared to the previous period"

Features and Capabilities

Natural Language Understanding

The AI understands complex data requests and translates them into precise SQL queries, handling:

  • Aggregations and calculations
  • Filtering and conditions
  • Joins across multiple tables
  • Temporal analysis (trends, comparisons)
  • Complex grouping and sorting

Schema Awareness

The AI understands your specific data model:

  • Automatically identifies relevant tables
  • Recognizes relationships between tables
  • Suggests appropriate joins
  • Identifies the right columns for your query

Query Optimization

Generated queries are automatically optimized for:

  • Performance
  • Accuracy
  • Readability

Interactive Refinement

If the generated query isn't exactly what you need:

  1. Provide feedback or additional details
  2. The AI will refine the query based on your input
  3. Iterate until you get the perfect query

Pricing and Token Usage

The AI query generation feature uses a token-based system:

  • Free Monthly Allowance: 100,000 tokens per month at no charge
  • Additional Usage: Billed at standard rates for tokens beyond the free allowance

What Are Tokens?

Tokens are the basic units of text processing for the AI system. As a rough guideline:

  • 1 token ≈ 4 characters in English
  • A typical query description might use 50-200 tokens
  • The generated SQL might use another 100-300 tokens

This means your free monthly allowance typically covers hundreds of query generations.

Best Practices

  1. Be Specific: The more details you provide, the more accurate the generated query will be
  2. Mention Tables: If you know which tables contain your data, mention them
  3. Specify Time Periods: Clearly state time ranges for temporal data
  4. Describe Calculations: Explain any calculations or aggregations you need
  5. Iterate: If the first result isn't perfect, refine your description