I currently have the following query
SELECT organisation.organisationID, COUNT(organisation.organisationID)
FROM position, positionLocation, organisation
WHERE position.positionLocationID = positionLocation.positionLocationID AND
positionLocation.organisationID = organisation.organisationID AND
position.status = 'Open'
GROUP BY organisation.organisationID;
This query prints
organisationID | countOrganisationID
1 3
3 2
5 3
I would like to display entries with max countOrganisationID. Ideally, I would just like to display the organization identifier with its corresponding organizationName, if possible.
Something along the lines
organisationID | organisatioName
1 name1
5 name2
Any help would be appreciated
thank
amitl source
share