Query editor
WITHsup AS (SELECT "Synth" AS synth, CAST(REPLACE("Total Supply",',','') AS double) AS total_supplyFROM query_8148188),ooc AS (SELECT "Synth" AS synth, CAST(REPLACE("Held (out of circ)",',','') AS double) AS out_of_circFROM query_8148360WHERE "Venue" LIKE 'TOTAL%'),debt AS (SELECT "Synth" AS synth, CAST(REPLACE("Outstanding Debt",',','') AS double) AS debtFROM query_8148381WHERE "Collateral" = 'TOTAL'),j AS (SELECT s.synth,s.total_supply,COALESCE(o.out_of_circ,0) AS out_of_circ,s.total_supply - COALESCE(o.out_of_circ,0) AS circulating,COALESCE(d.debt,0) AS debtFROM sup sLEFT JOIN ooc o ON o.synth = s.synthLEFT JOIN debt d ON d.synth = s.synth)SELECT synth AS "Synth",format('%,d', CAST(ROUND(total_supply,0) AS bigint)) AS "Total Supply",format('%,d', CAST(ROUND(out_of_circ,0) AS bigint)) AS "Not in Circulation",format('%,d', CAST(ROUND(circulating,0) AS bigint)) AS "Circulating",format('%,d', CAST(ROUND(debt,0) AS bigint)) AS "Backed",format('%,d', CAST(ROUND(circulating-debt,0) AS bigint)) AS "Underbacked"FROM jORDER BY synth;