[SQL] RPostgreSQL Win32 package

2011-10-24 Thread Jira, Marcel
Hi! I'd like to use the statistics software GNU R (http://www.r-project.org/) as a PostgreSQL client. Currently I use RpgSQL but this package seems to be fitting better for smaller projects. As my project is about really big amounts of data, the package RPostgreSQL (http://code.google.com/p/rpo

[SQL] Select random lines of a table using a probability distribution

2011-07-13 Thread Jira, Marcel
Hi! Let's consider I have a table like this idqualificationgenderageincome I'd like to select (for example 100) lines of this table by random, but the random mechanism has to follow a certain probability distribution. I want to use this procedure to construct a test group for a

[SQL] Merge overlapping time-periods

2011-06-15 Thread Jira, Marcel
Hi! Although I try for some time, I am not able to write an SQL-Query that can do the following: I have a very big table (let's call it "mytable") with information like this: ID BEG END 1 2000-01-01 2000-03-31 1 2000-04-01 2000-05-31 1 2000-04-15 2000-07-31 1 2000-09-01