/*
 *  .and()
 *    .is("a", Op.EQUAL, 1)
 *    .is("a", Op.EQUAL, 7)
 *    .close()
 */
select d, e from dfs.`%1$s` where _id in (
  select _id
    from (select _id, flatten(foo) as f1, flatten(foo) as f2 from dfs.`%1$s`) as t1
    where t1.f1.a = 1 and t1.f2.a = 7
    )
