Creating and editing SQL queries via the visual user interface