0
MySQL查詢:如何在配置單元中寫入以下mysql查詢?
select * from user_balance_table a where report_date < 20130901 and a.user_id not in (select user_id from user_balance_table a where report_date <20130801);
我怎麼能寫在蜂巢相同的查詢?
MySQL查詢:如何在配置單元中寫入以下mysql查詢?
select * from user_balance_table a where report_date < 20130901 and a.user_id not in (select user_id from user_balance_table a where report_date <20130801);
我怎麼能寫在蜂巢相同的查詢?
select a.*
from
(select * from user_balance_table
where report_date < 20130901
) a
left outer join
(select user_id
from user_balance_table
where report_date <20130801
group by user_id
) b
on a.user_id=b.user_id and b.user_id is null;