원클릭으로
query-builder
// Convert natural language questions into SQL queries. Activates when users ask data questions in plain English like "show me users who signed up last week" or "find orders over $100".
// Convert natural language questions into SQL queries. Activates when users ask data questions in plain English like "show me users who signed up last week" or "find orders over $100".
Query and explore databases via MCP. Use when the user asks to inspect schemas, run SQL, browse tables, analyze data quality, generate ER diagrams, or work with PostgreSQL, MySQL, MariaDB, TiDB, SQLite, MongoDB, Redis, ClickHouse, Elasticsearch, or DuckDB.
Database operations including querying, schema exploration, and data analysis. Activates for tasks involving PostgreSQL, MySQL, MariaDB, TiDB, SQLite, MongoDB, Redis, Elasticsearch, or ClickHouse databases.
Database operations including querying, schema exploration, and data analysis. Activates for tasks involving PostgreSQL, MySQL, MariaDB, TiDB, SQLite, MongoDB, Redis, Elasticsearch, or ClickHouse databases.
Convert natural language questions into SQL queries. Activates when users ask data questions in plain English like "show me users who signed up last week" or "find orders over $100".
Help design database schemas, create tables, and plan data models. Activates when users ask to create tables, design schemas, or model data relationships.
Help design database schemas, create tables, and plan data models. Activates when users ask to create tables, design schemas, or model data relationships.
| name | query-builder |
| description | Convert natural language questions into SQL queries. Activates when users ask data questions in plain English like "show me users who signed up last week" or "find orders over $100". |
Convert natural language questions into SQL queries using the database schema.
Activate when user asks questions like:
Before generating SQL, always check the table structure:
whodb_tables(connection="...") → Get available tables
whodb_columns(table="relevant_table") → Get column names and types
Parse the natural language request:
Build the query following SQL best practices:
SELECT columns
FROM table
[JOIN other_table ON condition]
WHERE filters
[GROUP BY columns]
[HAVING aggregate_condition]
ORDER BY column [ASC|DESC]
LIMIT n;
whodb_query(query="generated SQL")
| Natural Language | SQL Pattern |
|---|---|
| "last week/month/year" | WHERE date_col >= DATE_SUB(NOW(), INTERVAL 1 WEEK) |
| "more than X" / "greater than X" | WHERE col > X |
| "top N" | ORDER BY col DESC LIMIT N |
| "how many" | SELECT COUNT(*) |
| "total" / "sum of" | SELECT SUM(col) |
| "average" | SELECT AVG(col) |
| "for each" / "by" | GROUP BY col |
| "between X and Y" | WHERE col BETWEEN X AND Y |
| "contains" / "like" | WHERE col LIKE '%term%' |
| "starts with" | WHERE col LIKE 'term%' |
| "is empty" / "is null" | WHERE col IS NULL |
| "is not empty" | WHERE col IS NOT NULL |
WHERE created_at >= NOW() - INTERVAL '7 days'
WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE)
WHERE created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)
WHERE created_at >= DATE_FORMAT(NOW(), '%Y-%m-01')
WHERE created_at >= DATE('now', '-7 days')
WHERE created_at >= DATE('now', 'start of month')
SELECT * FROM users
WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE)
ORDER BY created_at DESC;
SELECT p.name, SUM(oi.quantity) as total_sold
FROM products p
JOIN order_items oi ON p.id = oi.product_id
GROUP BY p.id, p.name
ORDER BY total_sold DESC
LIMIT 5;
SELECT customer_id, COUNT(*) as order_count
FROM orders
GROUP BY customer_id
ORDER BY order_count DESC;