.addTable("otherTable", "columnA", "columnB").addTable("stillOther", "columnX", "columnY")
.build();
// Define the first subquery command ...
QueryCommand subquery1 = builder.select("columnA").from("otherTable").where().propertyValue("otherTable", "columnB")
.isEqualTo("winner").end().query();
builder = new QueryBuilder(typeSystem);
// Define the second subquery command ...
QueryCommand subquery2 = builder.select("columnY").from("stillOther").where().propertyValue("stillOther", "columnX")
.isLessThan().cast(3).asLong().end().query();
builder = new QueryBuilder(typeSystem);
// Define the query command (which uses the subquery) ...
query = builder.selectStar().from("someTable").where().path("someTable").isLike(subquery2).and()
.propertyValue("someTable", "column3").isInSubquery(subquery1).end().query();
initQueryContext();