sub select temp table. How does this work in MySQL?
Posted by:
Joe Simone
Date: August 12, 2005 01:38PM
The following works in DB2 v8.1, but I am at a loss as to how to do this with MySQL. Any help is greatly appreciated.
Regards,
Joe
-------
SELECT
'Persons',
"temp".session_count,
COUNT("temp".session_count) AS "#"
FROM
(SELECT
enr.person_id,
COUNT(*) AS "SESSION_COUNT"
FROM
e2m.enrollment AS enr
GROUP BY
enr.person_id
ORDER BY
COUNT(enr.person_id)
DESC) AS "temp"
GROUP BY
"temp".session_count
ORDER BY
"temp".session_count ASC
Subject
Views
Written By
Posted
sub select temp table. How does this work in MySQL?
8949
August 12, 2005 01:38PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.