教程视频:http://v.youku.com/v_show/id_XOTIyMDIyNjgw.html
1)新建数据源:TEST(教程2)
2)右键TEST新建查询,输入名称:JDBC
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403163855558206.jpg)
3)选择数据:customers
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403163906543526.jpg)
4)选择域:全部
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403163914496375.jpg)
5)编辑条件:customer_id不是等于4
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164114480576.jpg)
6)预览JDBC查询
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164225512968.jpg)
7)group by查询:数据源选择customers;域选择city、state;分组域选择city、state
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164727699107.jpg)
8)预览group by查询
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164737637970.jpg)
9)返回主查询-分组-Having,编辑Having条件:state是等于CO
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164745340212.jpg)
10)预览Having查询
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164755558876.jpg)
11)多表关联的查询:数据选择多个表格:customers、orders、order_details、products
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164804793951.jpg)
12)选择域
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164814262797.jpg)
14)预览多表关联的查询
![](http://blog.vsharing.com/Uploads/UserDirs/9/3381/1352358/20150403164825918186.jpg)