Guest User

Bistamp to Bitso tag 25490962

a guest
Apr 1st, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.76 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 = 'rfEu1Wnr7LxStoFx8DBdzgr8M16FBUbH3K'
  21.   AND
  22.   TransactionResult = 'tesSUCCESS'
  23.   AND
  24.   DestinationTag = 25490962
  25. GROUP BY
  26.   DestinationTag
  27. ORDER BY
  28.   COUNT(Destination) DESC
Add Comment
Please, Sign In to add comment