When viewing the details on a row on the "Server Activity" table an sql query is listed along with a few timestamps. I've been assuming that the query shown is the last active query for that session. What I don't know is whether it is the last one committed or the last one begun. I've had some trouble with sessions stuck in "idle in transaction" status. I need to know if the query is the query that has not been committed or if it is the previous query (committed prior to one that is stuck).
I can't seem to find anything that says specifically what this query is, so I don't know whether I should be looking at the query shown to figure out what is going wrong or if I need to look elsewhere.