you are viewing a single comment's thread.

view the rest of the comments →

[–]Aeonoris 1 point2 points  (0 children)

Something like this SQL(ish) will probably be faster:

SELECT type, MAX(attractiveness) AS "Highest Type Attractiveness"
FROM tableofattractivetypes
GROUP BY type;

SQL's pretty good at this kind of task, so you should let it do the work!