Advertisement
Guest User

Bitstamp to Coins.ph summary by tag

a guest
Apr 1st, 2019
535
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. SELECT
  2. DestinationTag,
  3. COUNT(Destination) AS TxCount,
  4. SUM(CAST(AmountXRP AS NUMERIC)) / 1000000 AS TotalXRP, -- Convert total drops to XRP, without scientific notation output.
  5. MIN(EXTRACT(DATE FROM l.CloseTime)) AS FirstTransactionDate,
  6. MAX(EXTRACT(DATE FROM l.CloseTime)) AS LastTransactionDate
  7. FROM
  8. xrpledgerdata.fullhistory.transactions t
  9. JOIN
  10. xrpledgerdata.fullhistory.ledgers l
  11. ON
  12. t.LedgerIndex = l.LedgerIndex
  13. WHERE
  14. Account = 'rDsbeomae4FXwgQTJp9Rs64Qg9vDiTCdBv'
  15. AND
  16. AmountXRP IS NOT NULL
  17. AND
  18. TransactionType = 'Payment'
  19. AND
  20. Destination = 'rU2mEJSLqBRkYLVTv55rFTgQajkLTnT6mA'
  21. AND
  22. TransactionResult = 'tesSUCCESS'
  23. GROUP BY
  24. DestinationTag
  25. ORDER BY
  26. COUNT(Destination) DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement