spool "foobar.dat"; select count(*) from foo_table; exit;