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) $ 68,044.23 1.55%
Ethereum (ETH) $ 2,411.60 2.57%
Tether (USDT) $ 0.999969 0.11%
BNB (BNB) $ 554.71 1.37%
Solana (SOL) $ 158.90 2.96%
USDC (USDC) $ 1.00 0.08%
XRP (XRP) $ 0.505546 0.23%
Dogecoin (DOGE) $ 0.162637 6.34%
Lido Staked Ether (STETH) $ 2,412.29 2.55%
TRON (TRX) $ 0.162711 1.44%