Microsoft Access has these peculiar set of aggregates called First and Last. We try to avoid them because while the concept is useful, we find Microsoft Access's implementation of them
a bit broken. MS Access power users we know moving over to something like MySQL, SQL Server, and PostgreSQL often ask - where's first and where's last?
First we shall go over what exactly these aggregates do in MS Access and how they are different from MIN and MAX and what they should do in an ideal world. Then we shall create our ideal
world in PostgreSQL.
Every once in a while - particularly if you are using inherited tables, you forget to put an important index on one of your tables
which bogs down critical queries. Its sometimes convenient to inspect the index catalog to see what tables are missing indexes or
what tables are missing a critical index. Normally we try to stick with querying the information_schema because queries against that
schema work pretty much the same in PostgreSQL as they do in SQL Server and MySQL. For most of the examples below we had to delve into pg_catalog schema territory
since there was no view we could find in information_schema that would give us enough detail about indexes.