Lets say I have two tables as such:
People
Id Name FirstDate LastDate
-- -------- --------- --------
A1 Bob 1/1/2007 5/6/2007
A2 Joe 1/4/2008 9/1/2008
.. .. ... ...
PiesBaked
Name Date Value
-------- ---- -----
Bob 1/1/2007 7
Bob 1/2/2007 9
.. ... ...
Joe ... ...
How can I construct a view that subsets PiesBaked to First/Last Date for a Name
Result
Id Name Date Value
-- ---- ---- -----
A1 Bob 1/1/2007 7
A1 Bob 1/2/2007 9
.. .. ... ...
A1 Bob 5/6/2007 ...
.. ... ... ...
Try this: