Add top-down test for to-sql/from-clause