Skip to content

Instantly share code, notes, and snippets.

View Mitchellpkt's full-sized avatar
🎯
Focusing

Mitchell P. Krawiec-Thayer Mitchellpkt

🎯
Focusing
View GitHub Profile
@Mitchellpkt
Mitchellpkt / tx_input_list_ringmember_freq.csv
Created November 25, 2021 21:02 — forked from neptuneresearch/tx_input_list_ringmember_freq.csv
Outputs used more than twice, sorted by usage count high to low
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 1. in line 1.
-- Count usage of ringmembers (identified by { vin_amount, amount_index }) that were used in rings (same or different) more than twice
SELECT
vin_amount,
amount_index,
COUNT(*) AS n_ringmembers
FROM tx_input_list
GROUP BY vin_amount, amount_index
HAVING COUNT(*) > 2
ORDER BY COUNT(*) DESC;