I need to make a top 5 of canceled contracts in a query, but I also need to bring the rest, because I need to plot the top 5 most canceled contracts and I need to know the rest in a single return.
The top 5 i managed to do, I just can't take advantage of the same query to bring the rest.
MATCH(dca:DashboardCancelamentoAno)<-[:NIVEL_HIERARQUIA_CANCELADOS_ANO]-(dcm:DashboardCancelamentoMes)
MATCH(dcm)<-[:NIVEL_HIERARQUIA_CANCELADOS_MES]-(dbcd:DashboardCancelamentoDia)
MATCH(dbcd)<-[:NIVEL_HIERARQUIA_CANCELADOS_DIA]-(dce:DashboardCancelamentoExecucao)
WHERE dca.ano = 2021 AND dcm.mes = 8
AND dce.fornecedor IN ["BRADESCO","SulAmérica Saúde","CNU","AMIL","UNIMED-RIO"]
return dce.fornecedor as Fornecedor, count(dce) as forc order by forc desc