10. 知的情報技術を日用品化する
SELECT S1, S2, R/N FROM
(SELECT LOG1.GET_MANAGEID AS S1, LOG2.GET_MANAGEID AS S2, COUNT(*) AS R
FROM ACCESS_LOG AS LOG1, ACCESS_LOG AS LOG2
WHERE LOG1.USERID = LOG2.USERID AND LOG1.GET_MANAGEID <> LOG2.GET_MANAGEID
GROUP BY LOG1.GET_MANAGEID, LOG2.GET_MANAGEID) AS COMBINATION,
(SELECT LOG3.GET_MANAGEID AS S3,COUNT(*) AS N
FROM ACCESS_LOG AS LOG3, ACCESS_LOG AS LOG4
WHERE LOG3.USERID = LOG4.USERID AND LOG3.GET_MANAGEID <> LOG4.GET_MANAGEID
GROUP BY LOG3.GET_MANAGEID) AS SUMMARY
WHERE S1=S3;
たった 10 行
Kobe.R