On Sun, 4 Nov 2018, Dr Eberhard Lisse wrote:

obviously

        s/MySQL/PostgreSQL/g

would do the trick.

  ...

All of the above I still find easier than something like

        psql -P format=latex | supertabfiler > psqltable.tex

Eberhard,

  What I did in the postgres shell (psql) was:

\out ../analyses/samples-per-site.txt
select s.site_nbr, s.site_name, min(sampdate), max(sampdate), count(c.sampd
ate)
from stations as s, concentrations as c
where s.site_nbr = c.site_nbr
group by s.site_nbr
order by count;
\out

  In emacs I changed the pipe (|) to a tab (\t), selected the entire file
and copied it to a buffer (M-w). Then, with the cursor in the top
row/leftmost cell I used Edit->Paste Special->Plain text. Et voila! the data
was in the table.

  After adding a new top row for the caption and rotating it 90 degrees it
was all done.

  No R, Python, Lua, Haskell, or anything else other than SQL.

Best regards,

Rich

Reply via email to