标签: sql-server sql-server-2008-r2
如何在MS SQL Server 2008/2008 r2中间隔1周后选择或查找2018年7月的日期
答案 0 :(得分:1)
使用以下命令添加行号:
row_number() over (partition by [month] order by [date]) as rn
然后
select ... where rn % 14 between 1 and 7