Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've this DB design I'm trying to build a query where I should get turno.tipo, maquina.patente, operador.nombre and detalle_emisores.revisado` but it's a bit complex to my knowledge. I started this:

    re . *, t.tipo, m.patente, o.nombre, de.revisado
    sdriving_registros_emisores re
        LEFT JOIN
    sdriving_turno t ON re.idturno = t.idturno
        LEFT JOIN
    sdriving_maquina_emisor me ON me.idmaquinaemisor = re.maquinaemisorid
        LEFT JOIN
    sdriving_maquina m ON me.idmaquina = m.idmaquina
        LEFT JOIN
    sdriving_operador o ON re.idoperador = o.idoperador
        LEFT JOIN
    sdriving_detalle_emisores de ON de.idregistros = re.idregistros
    o.idempresa = 1

Is that right, any advice?

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.