kennygadams
Programmer
Hi,
I am developing the following page which will list the top 10 terms used to describe an image at ClipArtOf:
I need to select data from the following tables...
TABLE: term (has 40,000+ unique records)
FIELDS: term_id | term
TABLE: image_number (has 800,000+ duplicate records)
FIELDS: term_id | image_number | rank
Here is the code that I have so far and it is returning the top ten term_id's from the image_number table but I need it to also return "term" from the "term" table:
Thanks,
Kenny G. Adams
I am developing the following page which will list the top 10 terms used to describe an image at ClipArtOf:
I need to select data from the following tables...
TABLE: term (has 40,000+ unique records)
FIELDS: term_id | term
TABLE: image_number (has 800,000+ duplicate records)
FIELDS: term_id | image_number | rank
Here is the code that I have so far and it is returning the top ten term_id's from the image_number table but I need it to also return "term" from the "term" table:
Code:
SELECT term_id, COUNT(*) AS daCount FROM image_number GROUP BY term_id HAVING daCount > 1 ORDER BY daCount DESC LIMIT 10
Thanks,
Kenny G. Adams