Обсуждение: Finding PostgreSQL sample data.

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

Finding PostgreSQL sample data.

От
Paul Linehan
Дата:
Hi all,

in order to improve my analytic/window function skills, I went
here (http://www.postgresql.org/docs/current/static/tutorial-window.html).

Now, there appears to be some sort of sample data (empsalary), but
I can't find the necessary table(s) for this.

Is there somewhere I can get this data? I did Google "PostgreSQL
sample database" but no joy.

Finally, can anyone recommend any good site(s) for Analytic/Window
functions - preferably with sample tables - personally, I find it much
easier to relate to a concept if I can a) "eyeball" the data, and b)
experiment further with my own queries/ideas.

TIA and rgs,


Paul...


Re: Finding PostgreSQL sample data.

От
Thomas Kellerer
Дата:
Paul Linehan schrieb am 10.05.2016 um 15:22:
> in order to improve my analytic/window function skills, I went
> here (http://www.postgresql.org/docs/current/static/tutorial-window.html).
>
> Now, there appears to be some sort of sample data (empsalary), but
> I can't find the necessary table(s) for this.
>
> Is there somewhere I can get this data? I did Google "PostgreSQL
> sample database" but no joy.

See the Postgres Wiki:

   https://wiki.postgresql.org/wiki/Sample_Databases

> Finally, can anyone recommend any good site(s) for Analytic/Window
> functions - preferably with sample tables - personally, I find it much
> easier to relate to a concept if I can a) "eyeball" the data, and b)
> experiment further with my own queries/ideas.


The presention "Modern SQL" is worthwhile going through:

   http://modern-sql.com/slides

Window functions start at slide 65

Thomas


Re: Finding PostgreSQL sample data.

От
Paul Linehan
Дата:
2016-05-10 14:48 GMT+01:00 Thomas Kellerer <spam_eater@gmx.net>:


Hi, and thanks for your input.


>> Is there somewhere I can get this data? I did Google "PostgreSQL
>> sample database" but no joy.

> See the Postgres Wiki:
>    https://wiki.postgresql.org/wiki/Sample_Databases


Yes,  I found that straight away, but there's nothing that corresponds to
the data in the tutorial - a simple HR (Human Resources) schema or
similar.


> The presention "Modern SQL" is worthwhile going through:
>    http://modern-sql.com/slides
> Window functions start at slide 65


Danke, - I'll take a look,

Rgs, Paul...


> Thomas


Re: Finding PostgreSQL sample data.

От
Thomas Kellerer
Дата:
Paul Linehan schrieb am 10.05.2016 um 18:41:
>>> Is there somewhere I can get this data? I did Google "PostgreSQL
>>> sample database" but no joy.
>
>> See the Postgres Wiki:
>>     https://wiki.postgresql.org/wiki/Sample_Databases
>
> Yes,  I found that straight away, but there's nothing that corresponds to
> the data in the tutorial - a simple HR (Human Resources) schema or
> similar.
>

dellstore2: [...] PostgreSQL 8.4: Windowing Functions uses this test data to show some advanced queries.

   http://linux.dell.com/dvdstore/ds21_postgresql.tar.gz

The scripts for the database are in the build and load sub-directories




Re: Finding PostgreSQL sample data.

От
Neil Anderson
Дата:
On 2016-05-10 12:41 PM, Paul Linehan wrote:
> 2016-05-10 14:48 GMT+01:00 Thomas Kellerer <spam_eater@gmx.net>:
>
>
> Hi, and thanks for your input.
>
>
>>> Is there somewhere I can get this data? I did Google "PostgreSQL
>>> sample database" but no joy.
>
>> See the Postgres Wiki:
>>    https://wiki.postgresql.org/wiki/Sample_Databases
>
>
> Yes,  I found that straight away, but there's nothing that corresponds to
> the data in the tutorial - a simple HR (Human Resources) schema or
> similar.
>


Hi Thomas,

What about this gist? https://gist.github.com/marko-asplund/5561404

Looks like the structure and data match the example?

Neil

>
>> The presention "Modern SQL" is worthwhile going through:
>>    http://modern-sql.com/slides
>> Window functions start at slide 65
>
>
> Danke, - I'll take a look,
>
> Rgs, Paul...
>
>
>> Thomas
>
>



Re: Finding PostgreSQL sample data.

От
Neil Anderson
Дата:
On 2016-05-14 11:32 PM, Neil Anderson wrote:
> On 2016-05-10 12:41 PM, Paul Linehan wrote:
>> 2016-05-10 14:48 GMT+01:00 Thomas Kellerer <spam_eater@gmx.net>:
>>
>>
>> Hi, and thanks for your input.
>>
>>
>>>> Is there somewhere I can get this data? I did Google "PostgreSQL
>>>> sample database" but no joy.
>>
>>> See the Postgres Wiki:
>>>    https://wiki.postgresql.org/wiki/Sample_Databases
>>
>>
>> Yes,  I found that straight away, but there's nothing that corresponds to
>> the data in the tutorial - a simple HR (Human Resources) schema or
>> similar.
>>
>
>
> Hi Thomas,

Paul, sorry

>
> What about this gist? https://gist.github.com/marko-asplund/5561404
>
> Looks like the structure and data match the example?
>
> Neil
>
>>
>>> The presention "Modern SQL" is worthwhile going through:
>>>    http://modern-sql.com/slides
>>> Window functions start at slide 65
>>
>>
>> Danke, - I'll take a look,
>>
>> Rgs, Paul...
>>
>>
>>> Thomas
>>
>>
>
>
>



Re: Finding PostgreSQL sample data.

От
Paul Linehan
Дата:
>> Hi Thomas,


> Paul, sorry


Thanks for that Neil - looks good!


Paul...