select count(*) from xxxxxxxx
> lateral view explode(pair) ids_table1 as id1 lateral view explode(pair) ids_table2 as id2
> lateral view explode(pair) ids_table1 as id1 lateral view explode(pair) ids_table2 as id2
> where year=2016 and month =2 and day =23 and id2.type=68 and id1.type=68 and sort_array(dates)[0]='20160223' limit 3;
select count(*) from xx
lateral view explode(pair) ids_table1 as id1 lateral view explode(pair) ids_table2 as id2
where year='2016' and month='02' and day='23' and id2.type=68 and id1.type=64 and array_contains(dates,'20160223');