extract details from inner query
Hi experts,
I wrote one query,
select st.visittime,st.userid,st.emailcode from alamyStatistics..st_emailTracking st join alamyOrders..op_order op on op.userid=st.userid where op.datepurchased between visittime and dateadd(dd,30,visittime)
is the details of users who are in both st_emailtracking & op_order and their datepurchased between 30days from their visittime. Here i will get one table,
Next from this table, i have to extract the visittime,userid,emailcode where datepurchased between '01-02-08' and '01-03-08'.
How to apply> can anyone help this one?