Re: Sample database with difficult SQL questions - Mailing list pgsql-general

From Craig Ringer
Subject Re: Sample database with difficult SQL questions
Date
Msg-id 51B53D48.6010400@2ndquadrant.com
Whole thread Raw
In response to Sample database with difficult SQL questions  ("Alexander Gataric" <gataric@usa.net>)
List pgsql-general
On 06/09/2013 07:42 AM, Alexander Gataric wrote:
> I need a sample database and hard practice SQL questions (multiple joins, window functions, subqueries, CTEs) to
writead hoc queries or perform database tasks. Any suggestions are welcome. Thanks in advance. 
One option would be to look through Stack Overflow problems tagged
[postgresql] and assemble a list.

All user-generated content on Stack Overflow is licensed under cc-wiki
with attribution required (see the footer):
  http://creativecommons.org/licenses/by-sa/3.0/
  http://blog.stackoverflow.com/2009/06/attribution-required/
so you're free to take things like sample data people have posted and
use them in the DB so long as you identify the sources of what you use
and make it available to others under the same terms.

Additional tags like [crosstab], [window-functionss], [pivot],
[subquery], [join], [common-table-expression] etc will sometimes help
you find more - in cases where it was primarily about subqueries, CTEs,
etc rather than answers just incidentally using them. Don't rely solely
on these tags, you'll want to do a bit of searching too.

It would be quite valuable to have such a collection. I'm not aware of
anything along those lines that already exists for PostgreSQL - a wholly
artificial demo data DB for SQL problems or one assembled from user
examples.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



pgsql-general by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Question on explain
Next
From: 高健
Date:
Subject: My function run successfully with cursor, but can't change table