SQL - 乘以列

时间:2015-06-18 11:03:27

标签: sql oracle maximo

我无法让这个工作

SELECT PM.PMNUM, (COUNT(ROUTE_STOP.LOCATION) * JOBPLAN.JPDURATION) 
FROM PM
LEFT OUTER JOIN ROUTE_STOP ON ROUTE_STOP.ROUTE = PM.ROUTE
LEFT OUTER JOIN JOBPLAN ON JOBPLAN.JPNUM = PM.JPNUM
GROUP BY PM.PMNUM

1 个答案:

答案 0 :(得分:-1)

因为我看到你的最小错过了一个小组。

SELECT PM.PMNUM, (COUNT(ROUTE_STOP.LOCATION) * JOBPLAN.JPDURATION) 
FROM PM
LEFT OUTER JOIN ROUTE_STOP ON ROUTE_STOP.ROUTE = PM.ROUTE
LEFT OUTER JOIN JOBPLAN ON JOBPLAN.JPNUM = PM.JPNUM
GROUP BY PM.PMNUM, JOBPLAN.JPDURATION

如果这无济于事,您需要提供进一步的反馈意见?