为什么下面的查询不起作用
select count(*) from db.full where substr(starttime,1,10) < (select min(cast(substr(starttime,1,10) as date)) as min_date from db.v9_N where substr(starttime,1,10) between '2018-10-01' and '2018-10-10');
为什么下面的查询有效?
select count(*) from db.full where substr(starttime,1,10) in (select min(cast(substr(starttime,1,10) as date)) as min_date from db.v9_N where substr(starttime,1,10) between '2018-10-01' and '2018-10-10');
请帮助我理解吗?
如何使上述查询可行?