我正在尝试制作一份显示计算机时代的报告。
SELECT
M.NAME AS MACHINE_NAME,
M.CS_MODEL AS MODEL,
DA.SERVICE_TAG,
DA.SHIP_DATE,
M.USER_LOGGED AS LAST_LOGGED_IN_USER,
DW.SERVICE_LEVEL_CODE,
DW.SERVICE_LEVEL_DESCRIPTION,
DW.END_DATE AS EXPIRATION_DATE
FROM MACHINE M
JOIN DELL_ASSET DA ON (M.BIOS_SERIAL_NUMBER = DA.PARENT_SERVICE_TAG OR M.BIOS_SERIAL_NUMBER = DA.SERVICE_TAG)
JOIN (SELECT SERVICE_TAG, SERVICE_LEVEL_CODE, SERVICE_LEVEL_DESCRIPTION, MAX(END_DATE) from DELL_WARRANTY group by SERVICE_TAG, SERVICE_LEVEL_CODE, SERVICE_LEVEL_DESCRIPTION) DW ON DW.SERVICE_TAG = DA.SERVICE_TAG
WHERE M.CS_MANUFACTURER LIKE '%dell%'
AND M.BIOS_SERIAL_NUMBER!=''
AND DA.DISABLED != 1
AND DW.END_DATE < NOW()
AND DW.SERVICE_TAG IS NULL
;
上面的代码会产生这个错误。我究竟做错了什么?
块引用
错误代码:1054。“字段列表”中的未知列“DW.END_DATE”