I have these two select statements joined with a union statement and they return the correct values. I would like to select the minimum of the two values?
from web_OnlinePass_Use wou
inner join web_top_id wti on wti.ind_id = wou.id
inner join Name n on n.ID = wou.id
where wti.top_ID = '16040' and (USE_DATE >= '12/07/2012' and USE_DATE <= '12/06/2013'))
from web_Online_library_Use wolu
inner join web_top_id wti on wti.ind_id = wolu.id
inner join Name n on n.ID = wolu.id
where wti.top_ID = '16040' and (olu_DATE >= '12/07/2012' and olu_DATE <= '12/06/2013'))
need the figure how to nest this union as part of another select min() statement?