Hola que tal de nuevo, tengo la siguiente consulta pero no me muestra :( me tira el siguiente error:
#1248 - Every derived table must have its own alias , segun yo esta bien, ustedes que opinan ya que trato de unir 2 tablas, saludos!
Código SQL:
Ver originalSELECT * FROM (
SELECT tl.idperson, tl.firstName, tl.lastName, tl.telephone, tl.degreeOfInterest, l.appointmentDate, e.firstName, i.marketability
FROM `todos_los_leads` AS tl
INNER JOIN leads AS l ON tl.idperson = l.idPerson
INNER JOIN empleados AS e ON tl.idEmployee = e.idEmployee
INNER JOIN infonavit AS i ON tl.idInfonavit = i.idInfonavit
UNION ALL
SELECT s.monthlyIncome
FROM `todos_los_leads` AS tl
INNER JOIN shf AS s ON tl.idSHF = s.idSHF
)