sql-analysis
यह क्या करती है
यह स्किल व्यावसायिक सवाल को जाँची हुई SQL क्वेरी और एक छोटी परिणाम तालिका में बदलती है। यह उन विश्लेषकों और मैनेजरों के लिए है जिन्हें क्वेरी खुद लिखे बिना डेटाबेस से संख्याएँ चाहिए।
कब इस्तेमाल करें
- ✓जब आप डेटाबेस में कितने, क्या रुझान है, या शीर्ष आइटम कौन से हैं, यह पूछते हैं।
- ✓जब आप डेटा का उपयोग करके दो समूहों या दो समय अवधियों की तुलना करना चाहते हैं।
- ✓जब आपको परिणाम तालिका के साथ वह क्वेरी भी चाहिए जिसने उसे बनाया।
Skill का लिंक
https://github.com/agentscope-ai/agentscope-java/blob/main/agentscope-examples/agents/agentscope-dataagent/src/main/resources/shared/agents/data-agent/skills/sql-analysis/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पिछले साल हर महीने, क्षेत्र के हिसाब से, हमें कितने नए ग्राहक मिले? मुझे क्वेरी और तालिका दिखाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल सवाल को एक मीट्रिक के रूप में दोबारा लिखती है, जिसमें समूहीकरण, समय सीमा और फ़िल्टर शामिल होते हैं। फिर वह SQL का ड्राफ़्ट बनाती है, उसे चलाती है, जाँचती है कि पंक्तियों की संख्या और नतीजे सही लगते हैं, और फिर क्वेरी के साथ तालिका बताती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
SQL Analysis Skill
Repeatable SOP for turning a business question into a verifiable SQL answer.
Steps
Restate the question as a metric. In one sentence, write: "<metric> by <grouping> over <time window>, filtered by <filter>". If any of those four (metric / grouping / window / filter) is missing or ambiguous, ask one clarifying question and stop. Do not guess.
Locate the source. Decide where the data lives:
- Look in
knowledge/first for any schema notes, data-dictionary entries, or prior query examples uploaded by the user. - If the right table is not obvious, delegate to the
data-explorersub-agent with the metric definition as the prompt — its job is to identify the canonical source.
- Look in
Draft the query. Write the SQL in a fenced
sqlblock. Conventions:- Always include the time window in a
WHEREclause — never query the full history "just in case". - Always
SELECTan explicit column list — neverSELECT *in an answer. - Use CTEs (
WITH x AS (...)) over nested subqueries for anything beyond two levels of nesting. - Comment any non-obvious filter (
-- excludes internal test accounts).
- Always include the time window in a
Validate before reporting. Run the query and check:
- Row count is in the ballpark you expected (1 row, 10 rows, ~30 daily buckets, etc.). A surprising row count is almost always a bug — investigate.
- No
NULLs in the grouping column unless that is the intended cohort. - At least one numeric sanity check: a known total, a known reference value, or a min/max range that matches reality.
- If anything looks off, do not report the number — fix the query first.
Write the report. Use this exact structure:
## Answer <one-sentence direct answer with the headline number(s)> ## Result <small markdown table — at most ~15 rows; for longer results, summarise and offer to render a chart or attach the full CSV> ## Query ```sql <the exact query you ran>Sources & validation
- Table(s):
schema.table_name(row count, freshness if known) - Validation: <which sanity checks you ran and the result>
- Caveats: <known data quality issues, missing dates, etc.>
- Table(s):
Anti-patterns
- ❌ Reporting a number without the query that produced it.
- ❌ Using
LIMIT Nto "make the output fit" without explaining what got cut. - ❌ Reading a single row and reporting it as a trend.
- ❌ Inventing a table or column name. If unsure, delegate to
data-explorer.
When to delegate
- The user's question requires probing several candidate tables / sources
before any query can be written → spawn
data-explorer. - The user wants a polished written deliverable summarising several analyses
(e.g. "weekly health report") → spawn
report-writerafter you have the underlying numbers ready.
अक्सर पूछे जाने वाले सवाल
क्या यह छूटी जानकारी का अंदाज़ा लगाती है?
नहीं, अगर मीट्रिक, समूहीकरण, समय सीमा या फ़िल्टर साफ़ नहीं है, तो स्किल एक स्पष्टीकरण वाला सवाल पूछती है।
क्या यह क्वेरी दिखाएगी?
हाँ, यह परिणाम तालिका के साथ SQL भी पेश करती है।
क्या यह जवाब की जाँच करती है?
हाँ, बताने से पहले यह जाँचती है कि पंक्तियों की संख्या और मान तर्कसंगत लगते हैं।
जानकारी
लेखक का मूल विवरण
Answer a quantitative business question by writing a SQL query against the data warehouse, validating it, and presenting the result. Use when the user asks "how many...", "what's the trend of...", "compare X vs Y over...", "what's our top N...", or anything that resolves to a query against tabular data. Produces a small result table plus the underlying query.
लोकप्रियता
- GitHub स्टार
- 6.2k
- रैंकिंग में स्थान
- #14391
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
agentscope-java
6.2kआपके एजेंट को AgentScope के लिए नॉन-ब्लॉकिंग Java कोड लिखने में मदद करती है, जो Project Reactor पर बने मल्टी-एजेंट फ़्रेमवर्क के लिए है।
data-report
6.2kआपके एजेंट को किसी डेटासेट का औसत, कुल, दायरा और रुझान के साथ सारांश रिपोर्ट बनाने में मदद करती है, जो Markdown फ़ाइल के रूप में सहेजी जाती है।
data-transform
6.2kआपके एजेंट को डेटा फ़ाइल को CSV और JSON जैसे फ़ॉर्मेट के बीच बदलने में मदद करती है, ताकि डेटा दूसरे टूल में इस्तेमाल हो सके।
git-changelog
6.2kआपके एजेंट को Git इतिहास से चेंजलॉग या रिलीज़ नोट्स लिखने में मदद करती है, जो फ़ीचर, सुधार और अन्य बदलावों में समूहित होते हैं।
मिलती-जुलती skills
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।