Specific Crosstab

44 views Asked by At

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!

0

There are 0 answers