Skip to content

itdxer/chaining-ranges-in-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Chaining ranges in SQL

The main purpose for this code is to provide an example of the solution for the following problem

Let's say we have an office that can be accessed only using an ID card. Each time an employee enters and leaves the office we record this event as a row in the database. In the database, we store user ID, time when an employee entered and left the office. We want to write a query that extracts all time ranges when there was at least one person in the office.

About

Code with examples provided for the article

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages