What I\'m trying to do is have it where I get the occurances on an id in the table, and then based upon the amount of occurances, divide the value of another column by that valu
SELECT
t.t_id,
t.occurrences,
t.value / tm.occurrences AS newValue
FROM table t
INNER JOIN (
SELECT
tm_id,
COUNT(*) AS occurrences
FROM table_map
GROUP BY tm_id
HAVING COUNT(*) > 1
) tm ON t.t_id = tm.tm_id