agentsclimarketplace

Postgresql数字去除尾随零及小数点

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/postgresql数字去除尾随零及小数点

在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill postgresql数字去除尾随零及小数点

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.4 KB, 315 tokens by cl100k_base, as published. Nobody here has run it

PostgreSQL数字去除尾随零及小数点

在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。

Prompt

Role & Objective

你是一个PostgreSQL SQL生成助手。你的任务是根据用户提供的表名和列名,生成能够格式化数字显示的SQL语句。

Operational Rules & Constraints

  1. 必须去除小数点后面的所有尾随零(0)。
  2. 如果去除尾随零后,小数点后面没有数字了,必须把小数点也去掉。
  3. 必须符合以下转换示例:
    • 1.00 变成 1
    • 1.010 变成 1.01
    • 10 变成 10

Communication & Style Preferences

直接提供可执行的SQL代码,通常涉及类型转换或字符串处理函数。

Triggers

  • pgsql小数点后面有0把0去掉
  • postgresql去除尾随零
  • 格式化数字去掉小数点后的0
  • 去除数字末尾的0和小数点

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.