|
| 1 | +with all_data as ( |
| 2 | + select |
| 3 | + blockchain, |
| 4 | + env as environment, |
| 5 | + solver, |
| 6 | + accounting_period, |
| 7 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 8 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 9 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 10 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 11 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_ethereum |
| 12 | + union all |
| 13 | + select |
| 14 | + blockchain, |
| 15 | + env as environment, |
| 16 | + solver, |
| 17 | + accounting_period, |
| 18 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 19 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 20 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 21 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 22 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_ethereum |
| 23 | + union all |
| 24 | + select |
| 25 | + blockchain, |
| 26 | + env as environment, |
| 27 | + solver, |
| 28 | + accounting_period, |
| 29 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 30 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 31 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 32 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 33 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_gnosis |
| 34 | + union all |
| 35 | + select |
| 36 | + blockchain, |
| 37 | + env as environment, |
| 38 | + solver, |
| 39 | + accounting_period, |
| 40 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 41 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 42 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 43 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 44 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_gnosis |
| 45 | + union all |
| 46 | + select |
| 47 | + blockchain, |
| 48 | + env as environment, |
| 49 | + solver, |
| 50 | + accounting_period, |
| 51 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 52 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 53 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 54 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 55 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_arbitrum |
| 56 | + union all |
| 57 | + select |
| 58 | + blockchain, |
| 59 | + env as environment, |
| 60 | + solver, |
| 61 | + accounting_period, |
| 62 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 63 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 64 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 65 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 66 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_arbitrum |
| 67 | + union all |
| 68 | + select |
| 69 | + blockchain, |
| 70 | + env as environment, |
| 71 | + solver, |
| 72 | + accounting_period, |
| 73 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 74 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 75 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 76 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 77 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_base |
| 78 | + union all |
| 79 | + select |
| 80 | + blockchain, |
| 81 | + env as environment, |
| 82 | + solver, |
| 83 | + accounting_period, |
| 84 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 85 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 86 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 87 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 88 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_base |
| 89 | + union all |
| 90 | + select |
| 91 | + blockchain, |
| 92 | + env as environment, |
| 93 | + solver, |
| 94 | + accounting_period, |
| 95 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 96 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 97 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 98 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 99 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_avalanche_c |
| 100 | + union all |
| 101 | + select |
| 102 | + blockchain, |
| 103 | + env as environment, |
| 104 | + solver, |
| 105 | + accounting_period, |
| 106 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 107 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 108 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 109 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 110 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_avalanche_c |
| 111 | + union all |
| 112 | + select |
| 113 | + blockchain, |
| 114 | + env as environment, |
| 115 | + solver, |
| 116 | + accounting_period, |
| 117 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 118 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 119 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 120 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 121 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_polygon |
| 122 | + union all |
| 123 | + select |
| 124 | + blockchain, |
| 125 | + env as environment, |
| 126 | + solver, |
| 127 | + accounting_period, |
| 128 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 129 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 130 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 131 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 132 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_polygon |
| 133 | + union all |
| 134 | + select |
| 135 | + blockchain, |
| 136 | + env as environment, |
| 137 | + solver, |
| 138 | + accounting_period, |
| 139 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 140 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 141 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 142 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 143 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_bnb |
| 144 | + union all |
| 145 | + select |
| 146 | + blockchain, |
| 147 | + env as environment, |
| 148 | + solver, |
| 149 | + accounting_period, |
| 150 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 151 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 152 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 153 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 154 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_bnb |
| 155 | + union all |
| 156 | + select |
| 157 | + blockchain, |
| 158 | + env as environment, |
| 159 | + solver, |
| 160 | + accounting_period, |
| 161 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 162 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 163 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 164 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 165 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_linea |
| 166 | + union all |
| 167 | + select |
| 168 | + blockchain, |
| 169 | + env as environment, |
| 170 | + solver, |
| 171 | + accounting_period, |
| 172 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 173 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 174 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 175 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 176 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_linea |
| 177 | + union all |
| 178 | + select |
| 179 | + blockchain, |
| 180 | + env as environment, |
| 181 | + solver, |
| 182 | + accounting_period, |
| 183 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 184 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 185 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 186 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 187 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_plasma |
| 188 | + union all |
| 189 | + select |
| 190 | + blockchain, |
| 191 | + env as environment, |
| 192 | + solver, |
| 193 | + accounting_period, |
| 194 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 195 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 196 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 197 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 198 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_plasma |
| 199 | + union all |
| 200 | + select |
| 201 | + blockchain, |
| 202 | + env as environment, |
| 203 | + solver, |
| 204 | + accounting_period, |
| 205 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 206 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 207 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 208 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 209 | + from dune.cowprotocol.dataset_prod_data_per_solver_and_accounting_period_ink |
| 210 | + union all |
| 211 | + select |
| 212 | + blockchain, |
| 213 | + env as environment, |
| 214 | + solver, |
| 215 | + accounting_period, |
| 216 | + cast(accounting_period_start_time as timestamp) as accounting_period_start_time, |
| 217 | + cast(accounting_period_end_time as timestamp) as accounting_period_end_time, |
| 218 | + cast(consistency_reward_native as decimal(38, 0)) as consistency_reward_native, |
| 219 | + cast(consistency_reward_cow as decimal(38, 0)) as consistency_reward_cow |
| 220 | + from dune.cowprotocol.dataset_staging_data_per_solver_and_accounting_period_ink |
| 221 | +) |
| 222 | + |
| 223 | +select * from all_data |
| 224 | +where |
| 225 | + blockchain='{{blockchain}}' |
| 226 | + and |
| 227 | + accounting_period_start_time = cast('{{start_time}}' as timestamp) |
| 228 | + and |
| 229 | + accounting_period_end_time = cast('{{end_time}}' as timestamp) |
0 commit comments