Data semantics: the missing layer of your data warehouse

Coinbase
SELECT 
COUNT(*)
, DATE_TRUNC(‘month’, timestamp)
FROM facts.trades
WHERE asset = ‘BTC
GROUP BY 2
SELECT 
SUM(amount) AS volume
, DATE_TRUNC(‘month’, timestamp)
FROM facts.trades
WHERE asset = ‘ETH
GROUP BY 2
compute: sqlstorage: facts.trades 
measures:
— name: trade_volume
kind: sum
— name: trades
kind: count
dimensions:
— name: asset
kind: string
— name: timestamp
kind: time
measures: trades 
dimensions: month
filters: [asset=BTC]
measures: trade_volume 
dimensions: month
filters: [asset=ETH]

The post appeared first on The Coinbase Blog

Buy Bitcoin with Credit Card

BitMex Leverage Trading

Automated Trading Bot

Related Posts

Leave a Reply

Bitcoin (BTC) $ 63,217.94 1.07%
Ethereum (ETH) $ 3,237.62 2.99%
Tether (USDT) $ 0.999241 0.06%
BNB (BNB) $ 593.01 1.65%
Solana (SOL) $ 141.45 1.39%
USDC (USDC) $ 0.999491 0.05%
Lido Staked Ether (STETH) $ 3,236.94 3.04%
XRP (XRP) $ 0.519246 1.40%
Dogecoin (DOGE) $ 0.147612 1.25%
Toncoin (TON) $ 5.35 0.80%