使用一組由A組選擇stament通過使用組組select語句
SELECT
k.Ivalue, k.JOBDESCRIPTION ,
count(k.Ivalue) as TOTAL
FROM
(SELECT
a."ID" as Ivalue, b."JOBDESCRIPTION", rq."CURRENTSTATUS"
FROM
tblG2o_Requests a
INNER JOIN
tblG2o_JOBS b ON a."JOBPOSTID" = b."ID"
INNER JOIN
(SELECT
r.REQUESTID, ir."CURRENTSTATUS"
FROM
TBLG2O_RESULTSPOOL r
INNER JOIN
tblG2o_Requests ir ON r.RequestID = ir."ID"
WHERE
r.ShortListed = '1') rq ON rq.REQUESTID = a."ID"
WHERE
"ACTIVE" = '1'
AND "DATECOMPLETED" IS NULL
ORDER BY
"REQUESTDATE" DESC) k
GROUP BY
k.JOBDESCRIPTION
您使用了哪個數據庫?你有什麼問題? – 2014-08-28 11:13:54
現在用的Navicat訪問Oracle 12.收到此錯誤[ERR] ORA-00932:不一致的數據類型:預期 - 得到CLOB – Prince 2014-08-28 13:40:36