Baselight
WITH inflation_data AS 
(
  SELECT 
    "year", 
    "inflation_rate", 
    EXP(SUM(LN(1 + "inflation_rate")) OVER (ORDER BY "year")) as "comp_inflation"
  FROM @kaggle.prasertk_300_years_of_inflation_rate_in_us.inflation_data_1701_2022
  WHERE "year" >= 1985
  ORDER BY "year"
)
SELECT
    fire_data."year",
    fire_data."fires",
    fire_data."acres",
    CAST(REPLACE(REPLACE(fire_data."total", '$', ''), ',', '') AS BIGINT) AS "cost (nominal)",
    CAST(REPLACE(REPLACE(fire_data."total", '$', ''), ',', '') AS BIGINT) / inflation_data."comp_inflation" * (SELECT "comp_inflation" FROM inflation_data WHERE "year" = 2020 ) AS "cost (inflation-adjusted)"
FROM
    @kaggle.kkhandekar_total_wildfires_acres_affected_1983_2020.federal_firefighting_costs_suppression_only AS fire_data
INNER JOIN inflation_data
    ON fire_data."year" = inflation_data."year"
yearfiresacrescost (nominal)cost (inflation-adjusted)
1985825912896147239943000576544613.2501694
1986859072719162202778000477689282.8453737
1987713002447296335109000759062287.7321994
19887275050092905789260001260901143.0369592
19894894918273104997870001036701293.3061972
1990664814621621397952000786158433.1568824
1991757542953578206120000391531024.04091793
1992873942069929377466000696124086.0759265
1993588101797574240436000430497953.57316434
19947910740735799183350001596377172.871435
1995822341840546477126000805249068.0378724
19969636360659987011830001148923998.9363487
1997661962856959284148000456461711.98932296
1998810431329704416704000656277097.6323539
1999924875626093515516000795978902.0857626
200092250738349314108020002114892268.974048
20018407935709119526960001386562020.009812
200273457718471216740400002388639542.133665
200363629396084213271380001856524561.6148207
200465461809788010072440001367987342.657921
20056675386893898189540001079865518.4745345
200696385987374517044770002182046925.2299595
200785705932804516201450002013676031.5566049
200878979529246815858560001895248345.9459064
20097879259217869205290001100119471.5316138
2010719713422724809499000948458911.5791347
201174126871136713745250001563571059.5855062
201267774932623819024460002121666634.9439132
201347579431954617409340001922320253.3331928
201463212359561315221490001647784561.5814393
2015681511012514921305430002306394356.3904743
201667595550353819755450002117428799.9436002
2017714991002608629181650003066419454.66
201858083876749231432560003238182331.2000003
201950477466436415900000001605899999.9999998
2020589501012233622740000002274000000

Share link

Anyone who has the link will be able to view this.