我正在尝试构建看起来相当简单的嵌套查询,但是当我结合以下两个工作查询时,我收到以下错误:
字段列表 ErrorNr 中的未知表“cm”。= 1109。
SELECT `cm`.`cans_id` AS `cans_id`,
`cm`.`cans_date` AS `cans_date`,
`cm`.`begintfin` AS `begIntFin`,
`c`.`cans_id` AS `CAN_ID`,
`c`.`q001` AS `q001`,
`c`.`q002` AS `q002`,
`c`.`q093` AS `q093`,
`c`.`q094` AS `q094`,
`c`.`mru` AS `mru2`,
(SELECT Count(0) AS `count(*)`
FROM `cans2notes` `nt`
JOIN `cans2meta` `cm`
ON `cm`.`cans_id` = `nt`.`cans_id`
JOIN `cans2surveys` `c`
ON `c`.`cans_id` = `cm`.`cans_id`
WHERE ( `nt`.`cans_id` = `c`.`cans_id` ));
对此的任何想法将不胜感激。