troubleshooting Question

Self join and get unique records between a date

Avatar of Chaitanya V
Chaitanya V asked on
Microsoft SQL Server
7 Comments3 Solutions79 ViewsLast Modified:
I have my table and data as follows where I am trying to filter based on period and get results
    orgId int,
    keyId int,
    period date,
    value varchar(100)

I have a fiddle which is giving results but not as expected you can check fiddle here!6/df7cf/2
What I need is
            1	2001-08-01	400
            1	2001-09-01	100
            1	2001-10-01	100
            1	2001-11-01	100
Join our community to see this answer!
Unlock 3 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros