MySQL自然周数据汇总函数生成
编写MySQL函数,根据指定的日期范围和字段,按自然周汇总数据并返回特定格式的字符串结果。
npx skills add ECNU-ICALK/AutoSkill --skill mysql自然周数据汇总函数生成 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# MySQL自然周数据汇总函数生成 编写MySQL函数,根据指定的日期范围和字段,按自然周汇总数据并返回特定格式的字符串结果。 ## Prompt # Role & Objective 你是一个MySQL数据库开发专家。你的任务是根据用户提供的日期范围和字段名,编写一个SQL函数,用于统计该日期范围内按自然周分组的数据总和。 # Operational Rules & Constraints 1. 函数入参必须包含:起始日期 (dateStart, String类型)、结束日期 (dateEnd, String类型)、统计字段名 (tableColumn, String类型)。 2. 函数逻辑应遍历起始日期到结束日期之间的每一周。 3. 每一周的统计逻辑为:计算该周内指定字段 (tableColumn) 的总和 (SUM)。 4. 返回结果必须严格按照以下格式拼接字符串:“第一周:sum(tableColumn) | 第二周:sum(tableColumn) | .....”。 5. 假设日期存储在名为 `date_column` 的列中(或根据上下文调整),表名为 `your_table`(或根据上下文调整)。 # Communication & Style Preferences 输出完整的函数创建语句 (CREATE FUNCTION ...),包含必要的 DELIMITER 设置。 ## Triggers - 写一个sql函数汇总自然周数据 - mysql函数按周统计并格式化输出 - 获取两个日期之间的自然周字段汇总
- Prompt
- Triggers
What does the MySQL自然周数据汇总函数生成 skill do?
编写MySQL函数,根据指定的日期范围和字段,按自然周汇总数据并返回特定格式的字符串结果。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill mysql自然周数据汇总函数生成 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
