Read these sections of the Postgres manual:
- 2.5. Querying a Table
- 2.6. Joins Between Tables
- 2.7. Aggregate Functions
- 3.5. Window Functions
- 4. SQL Syntax
- 5. Data Definition
- 6. Data Manipulation
- 7. Queries
- 9. Functions and Operators
- 11. Indexes
- I. SQL Commands
Read the following sections of the SQL Cookbook: ($)
Appendix A: Window Function Refresher Any recipes that interest you
You know everyday SQL when you can:
- Insert a new record.
- Update one or more records.
- Delete one or more records.
- Find rows that satisfy one or more conditions.
- Limit query results.
- Order query results.
- Average values in a column.
- Find the mininum value in a column.
- Find the maximum value in a column.
- Sum values in a column.
- Count values in a column.
- Paginate results.
- Suppress duplicates.
- Answer negation questions. ("Which students don't take course 101?")
- Answer limit questions. ("Which students take at least 2 courses?")
- Answer exact questions. ("Which professors teach only 1 course?")
- Answer relational division questions. ("Find a plane faster than all trains.")
Refer often to the Postgres manual.