Cancel query can be accomplished either way:
By session with: SYSTEM$CANCEL_ALL_QUERIES(session_id)
By query with: SYSTEM$CANCEL_QUERY(query_id)
Additionally you can do the following (abort all if you have create user permissions:
ALTER USER [ IF EXISTS ] < name > ABORT ALL QUERIES
Note: to see running queries by another,