I have a database of company calls, for example let's say that the table has only:
-- TABELA CHAMADO -- id (id do chamado) inicio (data de inicio do chamado) id_criador (id do usuário que abriu o chamado) ----------------------------------------------
I need to compile a select that tells me how many calls each user opened each day of the month, returning 0 if he did not open any, for example.
id_criador dia qnt 1 2018-08-01 7 1 2018-08-02 0 1 2018-08-03 6
I already found in other threads the command
generate_series(DATE'2018-08-01',DATE'2018-08-31',INTERVAL'1 day')that returns me every day of the month, but I'm not able to merge this result with the data in the called table. What would be the best way to do this?