How to query group for increase or decrease in value
Join positions to itself.  In pseudo-sql:

select
    o.position,
    n.position
from positions as o        -- old
inner join positions as n  -- new
    on o.application_id = n.application_id
    and o.country = n.country
    and o.feed_id = n.feed_id
    and o.created = &lt;max value for this app, country and feed that's less than n.created&gt;


There's a discussion on this SO question for other options.