在我的情况下,我有2个项目项目和活动,他们看起来像这样.
@H_301_19@解决方法
项目是顶部的表格和底部的活动.
在Activity表中,activityID和projectID是主键.
我想要实现的是创建一个View,它返回所有项目,其活动的endDate晚于Project projectionEndDate.
总之,我想这样做:
SELECT * FROM Project WHERE (SELECT MAX(endDate) FROM Activity GROUP BY projectID) > projectedEndDate
但是我收到以下错误:
Subquery returned more than 1 value. This is not permitted when the subquery follows =,!=,<,<=,>,>= or when the subquery is used as an expression.
谢谢