How can I check which nodes have the highest value in a certain field? My content type 'Article' has an integer field called 'Ranking'. How can I check which nodes have the three highest values after saving a new node or comment? I'd like to use the result in a rule, so I'm looking for some kind of "The node has ranking 1/2/3" condition.

Any ideas how I can achieve this?
If within your Computed Field you've selected Store value in the database, you can easily use Views to sort results based upon this field.

So, for example, in broad strokes, you could create a View that filtered on whatever you needed, most probably published and node type; then for sort, you would select this field and select descending; in paging, you'd select a specific number, eg, 3; and in fields, you'd select whatever you wanted to display.

If you wanted to have a block of the top three nodes, in the fields I could see you selecting the title and so forth, but if you are wanting to see if a specific node was in the top three, I'd just put the node nid in there.

So, if that's the case, when this View is run, it will return three nids. 

If you look into views_get_view_result() you can quite easily access that output, eg:

$result=views_get_view_result('top_three'); // or whatever the name of the view is


will populate $result with something along these lines:

Array
(
    [0] =&gt; stdClass Object
        (
            [nid] =&gt; 2340
            [node_created] =&gt; 1390349535
        )

    [1] =&gt; stdClass Object
        (
            [nid] =&gt; 1176
            [node_created] =&gt; 1390086303
        )

    [2] =&gt; stdClass Object
        (
            [nid] =&gt; 1133
            [node_created] =&gt; 1390086313
        )

)


So, now you just have to look in there to see if your current nid is in there and if so, act accordingly.

Now, of course, the other question is where to put all of this?  I'd suggest looking into hook_node_update() but be aware of the performance considerations of doing all of this each time a node is updated.  Caching is certainly your friend here.