![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
彩虹伞
这个作者很懒,什么都没留下…
展开
-
sql 根据添加时间 计算每个小时的数据统计
SELECT SUBSTRING(add_time,1,13),count(1) FROM reward_record where activity_id=614 group by SUBSTRING(add_time,1,13);原创 2019-12-27 16:20:37 · 647 阅读 · 0 评论 -
sql 语句计算经纬度距离
SELECT ST_Distance_Sphere(POINT(117.547016,34.851178),POINT(117.568645,34.851918)) AS distant;SELECT ST_Distance_Sphere(POINT(117.548,34.851),POINT(117.547,34.851)) AS distant;原创 2019-12-24 14:55:36 · 796 阅读 · 0 评论 -
根据某一字段 查询重复数据
SELECT * FROM poetry_sentencewhere content in (select content from poetry_sentencegroup by content having count(content) > 1)and id not in (select min(id) from poetry_sentencegroup by content ...原创 2019-11-28 15:30:08 · 609 阅读 · 0 评论