Results 1 to 11 of 11
Mar 9, 2010, 23:00 #1
- Join Date
- May 2008
- Missouri, USA
- 0 Post(s)
- 0 Thread(s)
Trouble with Join and Correlated Subquery
I'm not sure if this is possible but I'm trying to right a compound query as seen below. I'm running in trouble in trying to include the second select in the from clause.
SELECT * FROM Tickets t JOIN Computers ON t.cid=Computers.cid JOIN Sites ON Computers.sid = Sites.sid, (SELECT COUNT(a.tid) FROM Actions a WHERE a.tid = t.tid GROUP BY a.tid) As ActionCount WHERE t.pid = 15 ORDER BY t.submitDate DESC;
I'm not quite sure how to handle the various alias when dealing with multiple joins and a correlated sub query.
Thanks for any suggestions you might offer.Follow Me On Twitter: BryceRay