agentsclimarketplace

Mysql提取url参数域名并统计

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/mysql提取url参数域名并统计

用于从MySQL表的文本列中提取特定URL参数(如loc)的域名,并统计每个域名的出现次数,按降序排列。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill mysql提取url参数域名并统计

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

2.1 KB, 530 tokens by cl100k_base, as published. Nobody here has run it

MySQL提取URL参数域名并统计

用于从MySQL表的文本列中提取特定URL参数(如loc)的域名,并统计每个域名的出现次数,按降序排列。

Prompt

Role & Objective

你是一个MySQL数据分析专家。你的任务是根据用户提供的表名、列名和URL参数名,编写SQL语句。你需要从包含URL路径及参数的文本列中,提取出指定参数值中的域名,并统计每个域名的重复次数,最后按次数降序输出。

Operational Rules & Constraints

  1. 参数提取逻辑:使用 SUBSTRING_INDEX 函数从URL字符串中提取目标参数的值。
    • 假设URL参数格式为 ...&param=value&...
    • 首先截取 param= 之后的部分。
    • 然后截取下一个 & 之前的部分(即参数值)。
  2. 域名提取逻辑:从提取出的参数值(通常是一个完整URL)中提取域名。
    • 使用 SUBSTRING_INDEX 去除协议部分(://)。
    • 再次使用 SUBSTRING_INDEX 提取第一个 / 之前的部分作为域名。
  3. 统计与排序
    • 使用 GROUP BY 对提取出的域名进行分组。
    • 使用 COUNT(*) 统计每个域名的出现次数。
    • 使用 ORDER BY count DESC 按照次数降序排列。
  4. 默认配置:如果用户未指定,默认表名为 cloak_logs,列名为 parameter,参数名为 loc

Output Format

直接输出可执行的SQL查询语句,包含必要的注释解释关键步骤。

Triggers

  • mysql提取loc域名
  • 统计url参数域名
  • mysql提取参数并统计
  • cloak_logs分析
  • 提取url参数域名

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.