Skip to content
Advertisement

how do i divide and add column

i have a list with peoples id and date, the list say when a person Entered to website (his id and date). how can i show for all the dates how many people enter the site two days in a row?

I succeeded to show the amount of pepole enter the site on the same day but i didnt succeeded to add a column that show the pepole that enter 2 days in row.

Advertisement

Answer

how can i show for all the dates how many people enter the site two days in a row?

I would just use lag():

Your code suggests SQL Server, so I used the date functions in that database.

If you want this per date:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement