下载吧 - 绿色安全的游戏和软件下载中心

软件下载吧

当前位置:软件下载吧 > 技术开发 > 数据库 > postgreSQL 数据库基础 row_number() 与distinct用法说明

postgreSQL 数据库基础 row_number() 与distinct用法说明

时间:2024-02-07 12:09作者:下载吧人气:28

我就废话不多说了,大家还是直接看代码吧~

select count(s.*)
from (
select *, row_number() over (partition by fee_date order by fee_date) as gr
from new_order where news_id=’novel’ and order_status=’2′
) s
where s.gr = 1
SELECT count(DISTINCT fee_date) as dis from new_order where news_id=’novel’ and order_status=’2′

标签MySQL,技术文档,数据库,PostgreSQL

相关下载

查看所有评论+

网友评论

网友
您的评论需要经过审核才能显示

热门阅览

最新排行

公众号