Combined visual query building with direct SQL text editing