I managed to figure out a query that does what I want.
SELECT listID, COUNT(*) AS Occurrences
FROM componentsToLists
WHERE componentID = ANY(
SELECT components.id
FROM components
WHERE
Ben
This ranks a set of lists based on the number of named parts
the
contain in them. anyone either a) know how to rewrite this
for version
4.1 or b) make it faster.
SELECT l.listID, COUNT(*) AS Occurrences
FROM componentsToLists AS l
INNER JOIN components AS c ON l.componentID=c.ID
I am fairly new to SQL and have run into a problem I can't figure
out. I am trying to construct a query that returns an occurrence
ranked list of results.
I have the following tables and fields:
components
id
name
componentsToPartsList