This is certainly a queer query. You group by ID, so you get one result record per ID. But ID suggests that this is the table's ID identifying records uniquely. So GROUP BY id doesn't change anything, you still get all records in your results. With one exception: min(frequency) now means the minimum frequency per group. As the "group" is one record, the minimum value is the the value itself of course. The non-aggregated frequency is also the records' frequency uniquely identified by ID. So your query can be re-written as:
SELECT
frequency, frequency - frequency
FROM words
ORDER BY frequency;
I suppose you want to compare each record's frequency with the minimum frequency found in the table? You'd get this value in a subquery:
SELECT
frequency, frequency - (select min(frequency) from words)
FROM words
ORDER BY frequency;
Or:
SELECT
w.frequency, w.frequency - m.min_frequncy
FROM words w
CROSS JOIN (select min(frequency) as min_frequncy from words) m
ORDER BY frequency;