Google SpreadSheet Query:如何查询特定交易的最新手续费
Solution for Google Sheets Query to Retrieve the Latest Fee
Got it, let’s work through building the right Query formula for your exact needs.
First, let’s align with typical column mappings (adjust these to match your actual sheet structure):
- Timestamp: Column A
- FROM: Column B
- Currency: Column C
- Fee value: Column D (swap this for the actual column where your fee data lives)
To pull the latest fee number (no labels, just the raw value) for your specified FROM and Currency conditions, use this formula:
=QUERY(A1:G5, "SELECT D WHERE B = 'Your_Target_From' AND C = 'Your_Target_Currency' ORDER BY A DESC LIMIT 1", 0)
Let’s break down each component to make sure it fits your requirements:
SELECT D: Targets the column containing your fee values (replace D with the correct column letter in your sheet)WHERE B = 'Your_Target_From' AND C = 'Your_Target_Currency': Filters rows to only include transactions matching your desired FROM and Currency criteria. Remember to wrap text values in single quotes.ORDER BY A DESC: Sorts rows by timestamp in descending order, so the most recent transaction appears firstLIMIT 1: Keeps only the top (latest) row from the sorted results- Final
0: Instructs Query to exclude header labels from the output, which meets your "no labels" requirement
For example, if you’re filtering for FROM = "Coinbase" and Currency = "ETH", with fees stored in column G, your formula would look like this:
=QUERY(A1:G5, "SELECT G WHERE B = 'Coinbase' AND C = 'ETH' ORDER BY A DESC LIMIT 1", 0)
This will return just the fee number (like 0.1 from your reference result) without any extra headers or labels.
内容的提问来源于stack exchange,提问作者LubieCiastka
相关产品推荐
相关产品推荐

