Posts by Carlos Paliari • 23 points
1 post
-
2
votes1
answer689
viewsQ: Query using "select" and "joins" with activerecord in Rails 4
I need to make a report and I have the following query: Deducao.joins(:prestador) .select('pessoas.razao_social, pessoas.qtd_min_mensal, count(deducoes.id)') .group('deducoes.prestador_id')…