The Wise Owl logo (an owl and the company name)

Our training courses

Other training resources

Our training venues

Why we are different

Details for FelixP

FelixP has participated in the following threads:

Added by FelixP on 22 Mar 2021 at 21:19

You won't  spoil it TOTOally, huh? D

Added by FelixP on 21 Mar 2021 at 11:24

MYSQL solution:


select sub1.ContName as Continent, eventName as Event from tblEvent e
    join tblCountry ctr on ctr.CountryID = e.CountryID
    join (
        select cont1.ContinentID, cont1.ContinentName as ContName, count(e1.EventID) as eventCount 
        from tblEvent e1
            join tblCountry ctr1 on ctr1.CountryID = e1.CountryID
            join tblContinent cont1 on cont1.ContinentID = ctr1.ContinentID
            group by cont1.ContinentID, cont1.ContinentName
            order by eventCount 
            limit 3) as sub1
        on sub1.ContinentID = ctr.ContinentID

Added by FelixP on 21 Mar 2021 at 10:51

MYSQL solution

For mysql-typical error 1235 see this https://stackoverflow.com/questions/17892762/mysql-this-version-of-mysql-doesnt-yet-support-limit-in-all-any-some-subqu



SELECT EventName , EventDetails
    FROM tblEvent e1
    WHERE e1.CountryID NOT IN
    (  SELECT sub1.CountryID FROM -- wrapping due due Error code: 1235
       (SELECT c1.CountryID FROM tblCountry c1 
      ORDER BY c1.CountryName DESC
       LIMIT 30) sub1
    ) 
 AND e1.CategoryID NOT IN
    ( 
        SELECT sub2.CategoryID FROM   -- wrapping due due Error code: 1235
        (SELECT cat1.CategoryID FROM tblCategory cat1
         ORDER BY cat1.CategoryName DESC
        LIMIT 15) sub2
    )  
    ORDER BY e1.EventDate

Head office

Kingsmoor House

Railway Street

GLOSSOP

SK13 2AA

London

Landmark Offices

99 Bishopsgate

LONDON

EC2M 3XD

Manchester

Holiday Inn

25 Aytoun Street

MANCHESTER

M1 3AE

© Wise Owl Business Solutions Ltd 2025. All Rights Reserved.

End of small page here
Please be aware that our website uses cookies!
I'm OK with this Tell me more ...