摘要:
利用Python做一个词频统计 GitHub地址:FightingBob 【Give me a star , thanks.】 词频统计 词频统计 对纯英语的文本文件【Eg: 瓦尔登湖(英文版).txt】的英文单词出现的次数进行统计,并记录起来 代码实现 1 import string 2 from 阅读全文
摘要:
这道题的难点在于求差值,因为这道题比较特殊 假设只有这两种水果 那 select sale_date, sum(if(fruit='apples', 1, -1)*sold_num) as diff from `Sales` group by sale_date order by sale_date 阅读全文
摘要:
a表,时间字段为create_time 查询过去一年的数据 select * from a where create_time between date_add(date(curdate()), interval -1 year) and date(curdate()); 过去一个月 select 阅读全文
摘要:
看完题目后,我一般先看结果的样子从结果可以看出,是按照成绩自定义分组自定义分组用到 group by case when所以先得出 select case when duration/60<5 then '[0-5>' when duration/60<10 then '[5-10>' when d 阅读全文
摘要:
简单函数CASE [col_name] WHEN [value1] THEN [result1]…ELSE [default] END new_col_name -- 枚举 select t_name, case t_name when '张三' then '严肃' when '李四' then ' 阅读全文