Re: Occurrence-based ranking [solved?]

2006-08-25 Thread Peter Brawley
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

Re: Occurrence-based ranking [solved?]

2006-08-25 Thread Ben Lachman
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 componen

Occurrence-based ranking

2006-08-23 Thread Ben Lachman
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 -