Use Argument Indexes
In Postgres, each of the arguments you specify in a select
statement has a 1-based index tied to it. You can use these indexes in the order by
and group by
parts of the statement.
Instead of writing
you can write
If you want to group by a table's type
and then order by the counts from highest to lowest, you can do the following
Last updated