run_query
Execute read-only SQL queries against socioeconomic survey microdata, returning up to 500 rows in 30 seconds. Use weighted columns for overall statistics and quote uppercase table or column names.
Instructions
执行一条只读 SQL 查询并返回结果。只接受 SELECT / WITH / EXPLAIN 等只读语句,单次最多返回 500 行,超时 30 秒。表名列名含大写字母时记得加双引号。统计总体指标时请使用表里的抽样权重列加权。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | 一条只读 SQL 语句,不要加结尾分号 | |
| limit | No | 最多返回多少行 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||