ID Group Date Description
1 8000 2014-11-08 17:00 From: NA TO: EE01
1 8000 2014-11-08 22:00 From: EE01 TO: EE04
2 8000 2014-11-08 17:00 From: NA TO: EE01
3 8000 2014-11-08 17:00 From: NA TO: EE01
3 8000 2014-11-10 13:10 From: EE01 TO: EE05
4 1234 2014-11-11 08:00 From: NA TO: EE01
7 1234 2014-11-11 08:00 From: NA TO: EE01
and so on ...
So just to explain, every ID is attached to a Group. So in group 8000 I have ID 1,2 and 3. in group 123 I got 4 and 7.
The Description column tells me a kind of history that the ID 3 started in Location NA then went to EE01 on the 11-08 at 17:00. Then it went to location EE05 on the 11-10 at 13:10pm...
What I would like as a qeury result is to see this:
Location QTY Units
So basically.. by locaiton inside the description column.. what is the count of ID in each right now.
and even if its possible... If I give a specific date... I would see the QTY up to that date (to see in time how it was into those locations)
Here's an alternative way to accomplish this. What it does is split each location into 2 columns into a temp table. After that, a union query selects first the "from" location with a quantity of -1, and
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.