0

I'm facing a problem with some data, so i need to use a crosstab to generate a specific report, could you help me?

Basicaly i have one query select like this: select route_id,id,tipo,local,valor_cobrado from itinerario

and inside this table i have this data below: enter image description here

As you can see we have sometimes Coleta and Entrega with the same route_id, so i need to have someting like that:

route_id | id | tipo Coleta | local Coleta | tipo Entrega | local Entrega | sum(valor_cobrado)

Is it possible? thank you!

Jim Jones
  • 18,404
  • 3
  • 35
  • 44
Ademir Gomes
  • 11
  • 1
  • 4
  • It smell likes a simple aggregation, but to be sure please share the exact expected result. – Jim Jones Jul 13 '22 at 06:38
  • Thank you for your help, Jim! I need to have a result like that using rows 14 and 15 in my print above: 12 | Coleta | DDTI | Entrega | Vogler Industria e Comércio Ltda | 888.40 | – Ademir Gomes Jul 13 '22 at 13:47

0 Answers0