How do I select min/max dates from table 2 based on date in table 1?
问题 I have a monthly table (only holds rows with first day of month, and unique constraint so only one of each) and a daily table with similar information for each day (same deal, only one per day): Monthly table Daily table ------------- ----------- 2009-01-01 2009-01-01 2009-02-01 2009-01-02 : : : : 2009-09-01 2009-01-31 2009-02-01 : : 2009-02-28 2009-03-01 : : 2009-09-01 but there may be days missing. I want to run a query that returns, for each date in the monthly table, that date along with