Operations By trx_id
To get the operations by a transaction id, you have to first get block_num and trx_in_block from the haf_transactions view then use those to get the operations from the haf_operations view.
Transaction
Get the transaction information. (Not including the operations)
SELECT * FROM hafsql.haf_transactions
WHERE trx_hash = decode('d76a9a470e8a9d7608f50e6fbb05d43c625e4d21', 'hex')
Transaction hash is stored as bytea by HAF in trx_hash and we have to encode/decode when dealing with that column.
The view provides the encoded trx_id but you can't filter by that.
Operations
Get the operations of that transaction. Which happens to be one operation in this case.
SELECT * FROM hafsql.haf_operations
WHERE block_num = 90875064 AND trx_in_block = 1
Joined as one query
The above but in one query.
SELECT o.* FROM hafsql.haf_transactions t
JOIN hafsql.haf_operations o
ON o.block_num = t.block_num
AND o.trx_in_block = t.trx_in_block
WHERE trx_hash = decode('d76a9a470e8a9d7608f50e6fbb05d43c625e4d21', 'hex')
Sometimes joining can make a query very slow. Experimenting and checking other ways of running the same query is always the best approach.