I’m trying to figure out if there is one way to code the overlap rather then building out 4 distinct queries in T-SQL.
We have a single table called T_DATA
, it has columns customer_id
, cust_identifier
, start_dt
, end_dt
, and others.
Here is a sample of what our data looks like and we need to return customers 1 and 2.
We are looking to find all the rows that fall into these scenarios.
short of building out nested queries and 4 different joins is there some other simplified ways to build out any kind of overlap.
4