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) $ 61,165.39 1.77%
Ethereum (ETH) $ 2,941.30 2.57%
Tether (USDT) $ 0.998133 0.17%
BNB (BNB) $ 588.05 2.62%
Solana (SOL) $ 148.16 0.40%
USDC (USDC) $ 1.00 0.09%
XRP (XRP) $ 0.501473 3.09%
Lido Staked Ether (STETH) $ 2,938.37 2.61%
Toncoin (TON) $ 6.80 10.52%
Dogecoin (DOGE) $ 0.145566 2.96%