select * where   from `tableName` t1 join `tableName` as  t2 on t1.id = t2.id where t1.date < '2016-10-06' and t2.date = '2016-10-06'.

没有测试,试一试吧