Postgresql – How can I make this aggregation query fast for my needs?
Describing the scenario I have this table called event defined in PostgresSQL that, among some not relevant ones, basically has 5 columns: id (integer): primary key of the table date (timestamp): date when the event occurred fk_type (integer): foreign key…