Github user rmetzger commented on the pull request:
https://github.com/apache/flink/pull/1862#issuecomment-206986445
Awesome! Really cool to see that coming to Flink.
I played a bit around with it and it seems to work ;)
```java
Table table = tableEnv.fromDataSet(input);
tableEnv.registerTable("tab", table);
tableEnv.registerTable("tab1", table);
Table res = tableEnv.sql("SELECT COUNT(tab1.acount) AS acount, tab.word " +
"FROM tab, tab1 " +
"WHERE tab.word = tab1.word GROUP BY tab.word");
res = res.filter("acount > 2");
```
```java
Table res = tableEnv.sql("SELECT COUNT(acount) AS acount, word " +
"FROM (SELECT * FROM tab WHERE acount = 1 ) " +
"GROUP BY word");
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---