此 SQL 查询
(SELECT * FROM OperatorRoster as roster
INNER JOIN ( SELECT *, count(*) as activeSlots FROM Connectors
group by (operator)) as connectors
ON connectors.operator = roster.operator)
工作正常并返回我需要的所有值,但我需要在新查询中使用结果
但如果我尝试使用它:
SELECT * FROM (SELECT * FROM OperatorRoster as roster
INNER JOIN ( SELECT *, count(*) as activeSlots FROM Connectors
group by (operator)) as connectors
ON connectors.operator = roster.operator) as q
它什么也不返回。我如何查询这个子查询?