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) $ 96,353.82 1.69%
Ethereum (ETH) $ 3,316.02 2.98%
Tether (USDT) $ 1.00 0.06%
Solana (SOL) $ 246.79 3.90%
BNB (BNB) $ 649.25 1.70%
XRP (XRP) $ 1.35 9.87%
Dogecoin (DOGE) $ 0.4129 5.08%
USDC (USDC) $ 1.00 0.27%
Cardano (ADA) $ 0.978254 8.56%
Lido Staked Ether (STETH) $ 3,316.72 2.97%