Обсуждение: python script for crosstab queries in PostgreSQL

Поиск
Список
Период
Сортировка

python script for crosstab queries in PostgreSQL

От
Andrew Gould
Дата:
I just finished a python script that performs a
crosstab query in PostgreSQL.  Since I do analysis
using MS Access, this was more of an academic
excercise.

I wrote the script using PyGreSQL because:

1. The script can be copied and saved as different
queries; and
2. I'm am, admittedly, squeamish about new languages
and compiling additional features into any
application.

The script has the following features:

1. The user defines all database connection and query
variables near the top of the file.
2. The script builds the sql query from defined
variables.
3. SELECT INTO