SQL statement assembly tool