new command which lets users export from an adhoc sql query