Merge parent-child tables in postgresql

0

I hope you can help me with this. I have 3 tables: vehicle (father), car (son), motorcycle (son) with the following fields.

Vehículo(id,marca,anio,precio)
Carro(nro_puertas integer) (Heredada de vehículo)
Moto(incluye_access boolean) (Heredada de vehículo)

The problem I have is that I can not generate a report that shows the following:

id, marca, anio, precio, nro_puertas, incluye_acces

where there will be some null in nro_puertas and in incluye_acces

This is the structure of the tables:

This is the result I want to get:

    
asked by Cristopher 16.03.2018 в 07:08
source

0 answers