Query editor
selectcall_tx_hash as tx_hash,call_block_time as block_time,call_block_number as block_number,a.contract_address as project_contract_address,a.leftOrder:makerAddress buyer,a.rightOrder:makerAddress as seller,'Sell' as trade_category, --TODO'Fixed price'as sale_type,paymentTokenAddress as currency_contract,false AS native_eth,feeData[0]:recipient as fee_recipient,'Trade' as evt_type,0.025 as platform_fee,case when length(feeData[1]:recipient) > 0 then 0.025 else 0 end as royalty_fee,1.0 as price_correction,a.call_trace_address,1 as tx_call_order, -- There is no multiple calls in 1 tx_hash-- more columns'Single Item Trade' as trade_type,'0x' || right(substring(a.rightOrder:makerAssetData, 11, 64), 40) as project_contract_address,case when length(a.rightOrder:makerAssetData) = 650 then bytea2numeric_v3(substr(a.rightOrder:makerAssetData,332,64))::stringelse bytea2numeric_v3(substr(a.rightOrder:makerAssetData,76,64))::stringend as nft_token_id,case when length(a.rightOrder:makerAssetData) = 650 then 'erc1155'else 'erc721' -- 138end as erc_standard,least((output_matchedFillResults:left:takerFeePaid)::numeric, (output_matchedFillResults:right:makerFeePaid)::numeric) as nft_item_count,least((output_matchedFillResults:left:makerFeePaid)::decimal(38,0), (output_matchedFillResults:right:takerFeePaid)::decimal(38,0)) as original_amount_raw,(feeData[0]:paymentTokenAmount)::decimal(38,0) as fee_amount_raw,feeData[1]:recipient as royalty_receive_address,(feeData[1]:paymentTokenAmount)::decimal(38,0) as royalty_amount_raw,a.contract_address as exchange_contract_addressfrom opensea_polygon_v2_polygon.ZeroExFeeWrapper_call_matchOrders awhere 1=1and call_successlimit 10