Query (SELECT) Learner guide based on abridged version of the official docs for version 12.
The docx version is dowloadable in order to be sent via email to your kindle or kindle app via a kindle address as configured on your Amazon account. The document is formatted to be readable in portrait mode at a font size of 4 using the Bookerly font.
This is an intermediate-level guide for people wishing to query an SQL database, perhaps to extract data for a spreadsheet.
The intention is an accelerated learning of practical SQL for queriers/analysts not database administrators or application developers. As such, 90% of the postgres documentation has been left out leaving only that pertinent to querying.
After reading this document, you should then familiarise yourself with builtin functions, here: https://www.postgresql.org/docs/12/functions.html to avoid undue extra work when composing your queries.
This learner guide goes in to detail while briefly overviewing but avoiding detail on a few advanced topics, marked ‘advanced’.
It is a subset of the official ‘PostgreSQL 12.0 Beta Documentation’ with some small additions and editing, the release version of which is available here: https://www.postgresql.org/docs/12/index.html
To avoid undue burdens to the learner, advanced SQL query features are touched on with examples for the purpose of recognition but the bulk of their explanatory text has been removed. These sections are marked with ‘advanced’. Advanced SQL is not necessary for most queries, and is usually of more interest to the experienced SQL user not the learner.
The information is arranged so that a novice user can follow it start to end to gain a full understanding of the topics without having to refer forward too many times. The chapters are intended to be self-contained, so that advanced users can read the chapters individually as they choose. The information in this part is presented in a narrative fashion in topical units. Readers looking for a complete description of a particular command should see Part VI.