SELECT *, (SELECT centros.dmsCentro FROM centros WHERE centros.DigitoRRG=ordenesEnTaller.tallerRRG) AS dmsCentro, (SELECT centros.numeroCuenta FROM centros WHERE centros.DigitoRRG=ordenesEnTaller.tallerRRG) AS numeroCuenta, (SELECT historicoORs.repairOrderId FROM historicoORs WHERE historicoORs.reference=ordenesEnTaller.identificador_or) AS orderID FROM ordenesEnTaller WHERE activa='1' AND cerradaVideos='1' AND fechaCCR >='2020-06-01 00:30:00' Subquery returns more than 1 row