This is a collection of various scripts I use to administer dbs. This is an old collection and much of the documentation will live in the script itself. Not all of them have proper author attribution and that will be a work in progress.
The 3 main ones I use -
These 3 are a mainstay and will be staying in the root. Use the sub folders to drill down to topics more appropriate for you. Feel free to check the version on the above and pull request if they are out of date.
Fun way to learn sql - http://pgexercises.com/questions/basic/