Visual Query Builder
This visual query builder is included in 
PgAccess, a visual interface to 
 PostgreSQL written entirely in 
vTcl , (Visual Tcl).
Visual Query Designer demo
Click here to download the source 
created by Constantin Teodorescu with vTcl (visual Tcl), teo@flex.ro
Facitilies
 - drag and drop selection of fields
 - drag and drop fields from a table to another do create links
 - move table position by dragging
 - point and click any link or table then press delete to delete them
 - modify sort order by clicking on (unsorted)
 - enter filter conditions as criteria (>2000 , ='item')
 - easy panning of table and result panels
 - show SQL command
If you want to use it for your database, modify ql_read_struct in order to read
 your table structure.
Feel free to use, modify or copy this software for non-commercial purposes.
In any other case, please contact me.
FLEX Consulting Braila, ROMANIA is able to deliver high end interfaces 
and any other commercial products written in Tcl/Tk just like that you have seen.