I was wondering.... how difficult to make would a sql gui be do you think, you know graphical relations, drag and drop some fields and out pops a generated sql.
Fairly complex. Or you could just use something like MicroOLAP Database Designer (got versions for both MySQL and Postgres).