我想使用 Core Data 执行以下 SQL 查询:
SELECT t1.date, t1.amount + SUM(t2.amount) AS importantvalue
FROM specifictable AS t1, specifictable AS t2
WHERE t1.amount < 0 AND t2.amount < 0 AND t1.date IS NOT NULL AND t2.date IS NULL
GROUP BY t1.date, t1.amount;
现在,看起来 CoreData 获取请求只能从单个实体获取。有没有办法在一个提取请求中完成整个查询?