@smallwebco/tinypivot-vue 1.0.62 → 1.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -186,7 +186,7 @@ ${n.length>0?fr(n):""}
|
|
|
186
186
|
|
|
187
187
|
## Query Rules
|
|
188
188
|
1. **READ-ONLY**: ONLY use SELECT. NEVER use INSERT, UPDATE, DELETE, DROP, ALTER, TRUNCATE, or any write operations.
|
|
189
|
-
2. **LIMIT
|
|
189
|
+
2. **NO LIMIT**: Do NOT add LIMIT clauses unless the user explicitly asks for a limited number of results. Return all matching rows by default.
|
|
190
190
|
3. **PRIMARY TABLE**: The main table is \`${(i==null?void 0:i.table)||"table_name"}\`
|
|
191
191
|
4. **JOINs ALLOWED**: You CAN JOIN with other tables listed in "Related Tables" when the user needs data from multiple tables.
|
|
192
192
|
5. **BE SPECIFIC**: Select relevant columns, not SELECT * (unless showing sample data)
|
|
@@ -195,7 +195,7 @@ ${n.length>0?fr(n):""}
|
|
|
195
195
|
Output queries in this EXACT format (the system auto-executes SQL blocks):
|
|
196
196
|
|
|
197
197
|
\`\`\`sql
|
|
198
|
-
SELECT column1, column2 FROM ${(i==null?void 0:i.table)||"table_name"} WHERE condition
|
|
198
|
+
SELECT column1, column2 FROM ${(i==null?void 0:i.table)||"table_name"} WHERE condition
|
|
199
199
|
\`\`\`
|
|
200
200
|
|
|
201
201
|
For JOINs (when user needs data from related tables):
|
|
@@ -204,7 +204,6 @@ SELECT p.column1, r.column2
|
|
|
204
204
|
FROM ${(i==null?void 0:i.table)||"primary_table"} p
|
|
205
205
|
JOIN related_table r ON p.foreign_key = r.id
|
|
206
206
|
WHERE condition
|
|
207
|
-
LIMIT 100
|
|
208
207
|
\`\`\`
|
|
209
208
|
|
|
210
209
|
For complex analysis, use CTEs:
|
|
@@ -214,7 +213,7 @@ WITH summary AS (
|
|
|
214
213
|
FROM ${(i==null?void 0:i.table)||"table_name"}
|
|
215
214
|
GROUP BY category
|
|
216
215
|
)
|
|
217
|
-
SELECT * FROM summary ORDER BY count DESC
|
|
216
|
+
SELECT * FROM summary ORDER BY count DESC
|
|
218
217
|
\`\`\`
|
|
219
218
|
|
|
220
219
|
## Response Format
|
|
@@ -227,7 +226,7 @@ Keep responses concise and insight-focused:
|
|
|
227
226
|
|
|
228
227
|
Example response:
|
|
229
228
|
"\`\`\`sql
|
|
230
|
-
SELECT department, AVG(salary) as avg_salary FROM employees GROUP BY department ORDER BY avg_salary DESC
|
|
229
|
+
SELECT department, AVG(salary) as avg_salary FROM employees GROUP BY department ORDER BY avg_salary DESC
|
|
231
230
|
\`\`\`
|
|
232
231
|
|
|
233
232
|
Engineering and Product teams have the highest average salaries at $145K and $138K respectively, while Support and Operations are at the lower end around $75K. This 2x salary gap may indicate market-driven compensation or role complexity differences.
|