Query editor
WITH token_data AS (SELECTprice,decimals,source,contract_addressFROM prices.latestWHEREcontract_address = 0xe6bfd33f52d82ccb5b37e16d3dd81f9ffdabb195LIMIT 1)SELECTTRY_CAST((78880159.0 / allocation_data.allocation_input) * token_input.input_amount AS DOUBLE) * (token_data.price) AS SXT_calculated_valueFROM token_dataCROSS JOIN (SELECTCAST(1 AS DOUBLE) AS input_amount) AS token_inputCROSS JOIN (SELECTCAST({{SXT_allocation_input}} AS DOUBLE) AS allocation_input /* Replaced with parameter */) AS allocation_dataWHEREallocation_data.allocation_input > 0