Skip to content

Tag: sql

SQL query for column numbers

I have a table with information like : With these 2 columns I need to pull a column like “New Column” which is basically serial numbers of pages for each order. I tried ROW_NUMBER() OVER(ORDER BY …

Calculate the numbers of week names

I tried to edit but I have not knowledge about the number of weeks: declare @from datetime= ‘2019-06-01’ declare @to datetime = ‘2019-06-19’ select datediff(day, -3, @to)/7-datediff(day, -2, @from)…