DAY | Affiliate | AFFILIATE_FEE_USD | |
---|---|---|---|
1 | 2025-02-17 00:00:00.000 | Thorswap | 0 |
2 | 2025-02-16 00:00:00.000 | Thorswap | 0 |
3 | 2025-02-15 00:00:00.000 | Thorswap | 0 |
4 | 2025-02-14 00:00:00.000 | Thorswap | 0 |
5 | 2025-02-13 00:00:00.000 | Thorswap | 0 |
6 | 2025-02-12 00:00:00.000 | Thorswap | 0 |
7 | 2025-02-11 00:00:00.000 | Thorswap | 0 |
8 | 2025-02-10 00:00:00.000 | Thorswap | 0 |
9 | 2025-02-09 00:00:00.000 | Thorswap | 0 |
10 | 2025-02-08 00:00:00.000 | Thorswap | 0 |
11 | 2025-02-07 00:00:00.000 | Thorswap | 0 |
12 | 2025-02-06 00:00:00.000 | Thorswap | 0 |
13 | 2025-02-05 00:00:00.000 | Thorswap | 927 |
14 | 2025-02-04 00:00:00.000 | Thorswap | 761 |
15 | 2025-02-03 00:00:00.000 | Thorswap | 8859 |
16 | 2025-02-02 00:00:00.000 | Thorswap | 29312 |
17 | 2025-02-01 00:00:00.000 | Thorswap | 48184 |
18 | 2025-01-31 00:00:00.000 | Thorswap | 4365 |
19 | 2025-01-30 00:00:00.000 | Thorswap | 12225 |
20 | 2025-01-29 00:00:00.000 | Thorswap | 7208 |
Spot-WiggumThorswap Daily Affiliate Fees
Updated 2025-02-17
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- forked from Daily Affiliate Fees @ https://flipsidecrypto.xyz/studio/queries/41959f50-148d-4d11-a7d6-d1c90fe176ef
-- forked from banbannard / Affiliate Fee - RUNE @ https://flipsidecrypto.xyz/banbannard/q/Zqikq5qhAE20/affiliate-fee---rune
WITH base AS (
SELECT
tx_id,
block_timestamp::date AS day,
affiliate_address,
affiliate_fee_basis_points,
split(from_asset, '-')[0] AS from_assets,
CASE
WHEN from_assets ILIKE '%/%' THEN split(from_assets, '/')[1]
ELSE split(from_assets, '.')[1]
END AS from_asset_names,
split(to_asset, '-')[0] AS to_assets,
CASE
WHEN to_assets ILIKE '%/%' THEN split(to_assets, '/')[1]
ELSE split(to_assets, '.')[1]
END AS to_asset_names,
concat(from_asset_names, ' -> ', to_asset_names) AS assets,
CASE
WHEN assets ILIKE '%RUNE' THEN 2
ELSE 1
END AS numbering,
sum(from_amount_usd) AS swap_volume
FROM
thorchain.defi.fact_swaps
WHERE
day >= '2024-01-01'
GROUP BY
tx_id, day, affiliate_address, affiliate_fee_basis_points,
from_asset, to_asset
),
base2 AS (
Last run: about 2 months agoAuto-refreshes every 12 hours
...
414
18KB
68s