Query editor
with transaction_details as (selectt.hash as transaction_hash,t."from" as user_address,t.value / 1e18 as value_in_ether, -- Convert value to Ethert.gas_used as gas_used,'buyWithNFTs' as transaction_typefrom ethereum.transactions as twhere t.to = 0x9DBd0FFD43A3D440CEc5Eb76c3dc02B9eeA56912 and t.success = true and substring(try_cast(t.data as varchar), 1, 10) = '0xfae68b1c'),aggregated_transactions as (select user_address, transaction_type,round(sum(value_in_ether), 3) as total_value_in_ether_per_user, -- Rounded to three decimal placescount(*) as transaction_count_per_user,array_join(array_agg( '<a href="https://monobase.xyz/ethereum/tx/' || try_cast(transaction_hash as varchar) || '" target="_blank">' || try_cast(transaction_hash as varchar) || '</a>'),', ' ) as transaction_hashesfromtransaction_detailsgroup byuser_address, transaction_type),total_transactions_and_value as (selectcount(*) as total_transaction_count,round(sum(value_in_ether), 3) as total_value_sent_to_presalefromtransaction_details)selectat.user_address,at.transaction_type,at.total_value_in_ether_per_user,at.transaction_count_per_user,at.transaction_hashes,tt.total_transaction_count,tt.total_value_sent_to_presalefromaggregated_transactions as at,total_transactions_and_value as ttorder byat.total_value_in_ether_per_user desc;