-- Common Table Expression examples


use master
go
drop database CTE
go
create database CTE
go

use cte
go
create table invoiceTree 
(
id int primary key,
amount float,
parent int
)
go
insert into invoiceTree VALUES ( 1, 1569.796000, 0 )
insert into invoiceTree VALUES ( 2, 1568.796000, 0 )
insert into invoiceTree VALUES ( 3, 1567.796000, 0 )
insert into invoiceTree VALUES ( 4, 1566.796000, 0 )
insert into invoiceTree VALUES ( 5, 1565.796000, 0 )
insert into invoiceTree VALUES ( 6, 1564.796000, 0 )
insert into invoiceTree VALUES ( 7, 1563.796000, 0 )
insert into invoiceTree VALUES ( 8, 1562.796000, 0 )
insert into invoiceTree VALUES ( 9, 1561.796000, 0 )
insert into invoiceTree VALUES ( 10, 1560.796000, 0 )
insert into invoiceTree VALUES ( 11, 1559.796000, 0 )
insert into invoiceTree VALUES ( 12, 1558.796000, 0 )
insert into invoiceTree VALUES ( 13, 1557.796000, 0 )
insert into invoiceTree VALUES ( 14, 1556.796000, 0 )
insert into invoiceTree VALUES ( 15, 1555.796000, 0 )
insert into invoiceTree VALUES ( 16, 1554.796000, 0 )
insert into invoiceTree VALUES ( 17, 1553.796000, 0 )
insert into invoiceTree VALUES ( 18, 1552.795000, 0 )
insert into invoiceTree VALUES ( 19, 1551.795000, 0 )
insert into invoiceTree VALUES ( 20, 1550.795000, 0 )
insert into invoiceTree VALUES ( 21, 1549.795000, 1 )
insert into invoiceTree VALUES ( 22, 1548.795000, 2 )
insert into invoiceTree VALUES ( 23, 1547.794000, 3 )
insert into invoiceTree VALUES ( 24, 1546.794000, 4 )
insert into invoiceTree VALUES ( 25, 1545.794000, 5 )
insert into invoiceTree VALUES ( 26, 1544.793000, 6 )
insert into invoiceTree VALUES ( 27, 1543.793000, 7 )
insert into invoiceTree VALUES ( 28, 1542.793000, 8 )
insert into invoiceTree VALUES ( 29, 1541.792000, 9 )
insert into invoiceTree VALUES ( 30, 1540.792000, 10 )
insert into invoiceTree VALUES ( 31, 1539.791000, 11 )
insert into invoiceTree VALUES ( 32, 1538.791000, 12 )
insert into invoiceTree VALUES ( 33, 1537.790000, 13 )
insert into invoiceTree VALUES ( 34, 1536.790000, 14 )
insert into invoiceTree VALUES ( 35, 1535.789000, 15 )
insert into invoiceTree VALUES ( 36, 1534.789000, 16 )
insert into invoiceTree VALUES ( 37, 1533.788000, 17 )
insert into invoiceTree VALUES ( 38, 1532.787000, 18 )
insert into invoiceTree VALUES ( 39, 1531.786000, 19 )
insert into invoiceTree VALUES ( 40, 1530.786000, 20 )
insert into invoiceTree VALUES ( 41, 1529.785000, 21 )
insert into invoiceTree VALUES ( 42, 1528.784000, 22 )
insert into invoiceTree VALUES ( 43, 1527.783000, 23 )
insert into invoiceTree VALUES ( 44, 1526.782000, 24 )
insert into invoiceTree VALUES ( 45, 1525.781000, 25 )
insert into invoiceTree VALUES ( 46, 1524.780000, 26 )
insert into invoiceTree VALUES ( 47, 1523.779000, 27 )
insert into invoiceTree VALUES ( 48, 1522.778000, 28 )
insert into invoiceTree VALUES ( 49, 1521.777000, 29 )
insert into invoiceTree VALUES ( 50, 1520.775000, 30 )
insert into invoiceTree VALUES ( 51, 1519.774000, 31 )
insert into invoiceTree VALUES ( 52, 1518.773000, 32 )
insert into invoiceTree VALUES ( 53, 1517.771000, 33 )
insert into invoiceTree VALUES ( 54, 1516.770000, 34 )
insert into invoiceTree VALUES ( 55, 1515.769000, 35 )
insert into invoiceTree VALUES ( 56, 1514.767000, 36 )
insert into invoiceTree VALUES ( 57, 1513.765000, 37 )
insert into invoiceTree VALUES ( 58, 1512.764000, 38 )
insert into invoiceTree VALUES ( 59, 1511.762000, 39 )
insert into invoiceTree VALUES ( 60, 1510.760000, 40 )
insert into invoiceTree VALUES ( 61, 1509.758000, 41 )
insert into invoiceTree VALUES ( 62, 1508.757000, 42 )
insert into invoiceTree VALUES ( 63, 1507.755000, 43 )
insert into invoiceTree VALUES ( 64, 1506.753000, 44 )
insert into invoiceTree VALUES ( 65, 1505.750000, 45 )
insert into invoiceTree VALUES ( 66, 1504.748000, 46 )
insert into invoiceTree VALUES ( 67, 1503.746000, 47 )
insert into invoiceTree VALUES ( 68, 1502.744000, 48 )
insert into invoiceTree VALUES ( 69, 1501.741000, 49 )
insert into invoiceTree VALUES ( 70, 1500.739000, 50 )
insert into invoiceTree VALUES ( 71, 1499.737000, 51 )
insert into invoiceTree VALUES ( 72, 1498.734000, 52 )
insert into invoiceTree VALUES ( 73, 1497.731000, 53 )
insert into invoiceTree VALUES ( 74, 1496.729000, 54 )
insert into invoiceTree VALUES ( 75, 1495.726000, 55 )
insert into invoiceTree VALUES ( 76, 1494.723000, 56 )
insert into invoiceTree VALUES ( 77, 1493.720000, 57 )
insert into invoiceTree VALUES ( 78, 1492.717000, 58 )
insert into invoiceTree VALUES ( 79, 1491.714000, 59 )
insert into invoiceTree VALUES ( 80, 1490.711000, 60 )
insert into invoiceTree VALUES ( 81, 1489.707000, 61 )
insert into invoiceTree VALUES ( 82, 1488.704000, 62 )
insert into invoiceTree VALUES ( 83, 1487.701000, 63 )
insert into invoiceTree VALUES ( 84, 1486.697000, 64 )
insert into invoiceTree VALUES ( 85, 1485.694000, 65 )
insert into invoiceTree VALUES ( 86, 1484.690000, 66 )
insert into invoiceTree VALUES ( 87, 1483.686000, 67 )
insert into invoiceTree VALUES ( 88, 1482.682000, 68 )
insert into invoiceTree VALUES ( 89, 1481.678000, 69 )
insert into invoiceTree VALUES ( 90, 1480.674000, 70 )
insert into invoiceTree VALUES ( 91, 1479.670000, 71 )
insert into invoiceTree VALUES ( 92, 1478.666000, 72 )
insert into invoiceTree VALUES ( 93, 1477.662000, 73 )
insert into invoiceTree VALUES ( 94, 1476.657000, 74 )
insert into invoiceTree VALUES ( 95, 1475.653000, 75 )
insert into invoiceTree VALUES ( 96, 1474.648000, 76 )
insert into invoiceTree VALUES ( 97, 1473.644000, 77 )
insert into invoiceTree VALUES ( 98, 1472.639000, 78 )
insert into invoiceTree VALUES ( 99, 1471.634000, 79 )
insert into invoiceTree VALUES ( 100, 1470.629000, 80 )
insert into invoiceTree VALUES ( 101, 1469.624000, 81 )
insert into invoiceTree VALUES ( 102, 1468.619000, 82 )
insert into invoiceTree VALUES ( 103, 1467.613000, 83 )
insert into invoiceTree VALUES ( 104, 1466.608000, 84 )
insert into invoiceTree VALUES ( 105, 1465.602000, 85 )
insert into invoiceTree VALUES ( 106, 1464.597000, 86 )
insert into invoiceTree VALUES ( 107, 1463.591000, 87 )
insert into invoiceTree VALUES ( 108, 1462.585000, 88 )
insert into invoiceTree VALUES ( 109, 1461.579000, 89 )
insert into invoiceTree VALUES ( 110, 1460.573000, 90 )
insert into invoiceTree VALUES ( 111, 1459.567000, 91 )
insert into invoiceTree VALUES ( 112, 1458.561000, 92 )
insert into invoiceTree VALUES ( 113, 1457.554000, 93 )
insert into invoiceTree VALUES ( 114, 1456.548000, 94 )
insert into invoiceTree VALUES ( 115, 1455.541000, 95 )
insert into invoiceTree VALUES ( 116, 1454.535000, 96 )
insert into invoiceTree VALUES ( 117, 1453.528000, 97 )
insert into invoiceTree VALUES ( 118, 1452.521000, 98 )
insert into invoiceTree VALUES ( 119, 1451.514000, 99 )
insert into invoiceTree VALUES ( 120, 1450.506000, 100 )
insert into invoiceTree VALUES ( 121, 1449.499000, 101 )
insert into invoiceTree VALUES ( 122, 1448.492000, 102 )
insert into invoiceTree VALUES ( 123, 1447.484000, 103 )
insert into invoiceTree VALUES ( 124, 1446.476000, 104 )
insert into invoiceTree VALUES ( 125, 1445.468000, 105 )
insert into invoiceTree VALUES ( 126, 1444.461000, 106 )
insert into invoiceTree VALUES ( 127, 1443.452000, 107 )
insert into invoiceTree VALUES ( 128, 1442.444000, 108 )
insert into invoiceTree VALUES ( 129, 1441.436000, 109 )
insert into invoiceTree VALUES ( 130, 1440.427000, 110 )
insert into invoiceTree VALUES ( 131, 1439.419000, 111 )
insert into invoiceTree VALUES ( 132, 1438.410000, 112 )
insert into invoiceTree VALUES ( 133, 1437.401000, 113 )
insert into invoiceTree VALUES ( 134, 1436.392000, 114 )
insert into invoiceTree VALUES ( 135, 1435.383000, 115 )
insert into invoiceTree VALUES ( 136, 1434.374000, 116 )
insert into invoiceTree VALUES ( 137, 1433.364000, 117 )
insert into invoiceTree VALUES ( 138, 1432.355000, 118 )
insert into invoiceTree VALUES ( 139, 1431.345000, 119 )
insert into invoiceTree VALUES ( 140, 1430.335000, 120 )
insert into invoiceTree VALUES ( 141, 1429.325000, 121 )
insert into invoiceTree VALUES ( 142, 1428.315000, 122 )
insert into invoiceTree VALUES ( 143, 1427.304000, 123 )
insert into invoiceTree VALUES ( 144, 1426.294000, 124 )
insert into invoiceTree VALUES ( 145, 1425.283000, 125 )
insert into invoiceTree VALUES ( 146, 1424.273000, 126 )
insert into invoiceTree VALUES ( 147, 1423.262000, 127 )
insert into invoiceTree VALUES ( 148, 1422.251000, 128 )
insert into invoiceTree VALUES ( 149, 1421.239000, 129 )
insert into invoiceTree VALUES ( 150, 1420.228000, 130 )
insert into invoiceTree VALUES ( 151, 1419.217000, 131 )
insert into invoiceTree VALUES ( 152, 1418.205000, 132 )
insert into invoiceTree VALUES ( 153, 1417.193000, 133 )
insert into invoiceTree VALUES ( 154, 1416.181000, 134 )
insert into invoiceTree VALUES ( 155, 1415.169000, 135 )
insert into invoiceTree VALUES ( 156, 1414.157000, 136 )
insert into invoiceTree VALUES ( 157, 1413.144000, 137 )
insert into invoiceTree VALUES ( 158, 1412.131000, 138 )
insert into invoiceTree VALUES ( 159, 1411.119000, 139 )
insert into invoiceTree VALUES ( 160, 1410.106000, 140 )
insert into invoiceTree VALUES ( 161, 1409.093000, 141 )
insert into invoiceTree VALUES ( 162, 1408.079000, 142 )
insert into invoiceTree VALUES ( 163, 1407.066000, 143 )
insert into invoiceTree VALUES ( 164, 1406.052000, 144 )
insert into invoiceTree VALUES ( 165, 1405.038000, 145 )
insert into invoiceTree VALUES ( 166, 1404.024000, 146 )
insert into invoiceTree VALUES ( 167, 1403.010000, 147 )
insert into invoiceTree VALUES ( 168, 1401.996000, 148 )
insert into invoiceTree VALUES ( 169, 1400.981000, 149 )
insert into invoiceTree VALUES ( 170, 1399.967000, 150 )
insert into invoiceTree VALUES ( 171, 1398.952000, 151 )
insert into invoiceTree VALUES ( 172, 1397.937000, 152 )
insert into invoiceTree VALUES ( 173, 1396.922000, 153 )
insert into invoiceTree VALUES ( 174, 1395.906000, 154 )
insert into invoiceTree VALUES ( 175, 1394.891000, 155 )
insert into invoiceTree VALUES ( 176, 1393.875000, 156 )
insert into invoiceTree VALUES ( 177, 1392.859000, 157 )
insert into invoiceTree VALUES ( 178, 1391.843000, 158 )
insert into invoiceTree VALUES ( 179, 1390.826000, 159 )
insert into invoiceTree VALUES ( 180, 1389.810000, 160 )
insert into invoiceTree VALUES ( 181, 1388.793000, 161 )
insert into invoiceTree VALUES ( 182, 1387.776000, 162 )
insert into invoiceTree VALUES ( 183, 1386.759000, 163 )
insert into invoiceTree VALUES ( 184, 1385.742000, 164 )
insert into invoiceTree VALUES ( 185, 1384.724000, 165 )
insert into invoiceTree VALUES ( 186, 1383.707000, 166 )
insert into invoiceTree VALUES ( 187, 1382.689000, 167 )
insert into invoiceTree VALUES ( 188, 1381.671000, 168 )
insert into invoiceTree VALUES ( 189, 1380.653000, 169 )
insert into invoiceTree VALUES ( 190, 1379.634000, 170 )
insert into invoiceTree VALUES ( 191, 1378.616000, 171 )
insert into invoiceTree VALUES ( 192, 1377.597000, 172 )
insert into invoiceTree VALUES ( 193, 1376.578000, 173 )
insert into invoiceTree VALUES ( 194, 1375.558000, 174 )
insert into invoiceTree VALUES ( 195, 1374.539000, 175 )
insert into invoiceTree VALUES ( 196, 1373.519000, 176 )
insert into invoiceTree VALUES ( 197, 1372.499000, 177 )
insert into invoiceTree VALUES ( 198, 1371.479000, 178 )
insert into invoiceTree VALUES ( 199, 1370.459000, 179 )
insert into invoiceTree VALUES ( 200, 1369.438000, 180 )
insert into invoiceTree VALUES ( 201, 1368.418000, 181 )
insert into invoiceTree VALUES ( 202, 1367.397000, 182 )
insert into invoiceTree VALUES ( 203, 1366.376000, 183 )
insert into invoiceTree VALUES ( 204, 1365.354000, 184 )
insert into invoiceTree VALUES ( 205, 1364.333000, 185 )
insert into invoiceTree VALUES ( 206, 1363.311000, 186 )
insert into invoiceTree VALUES ( 207, 1362.289000, 187 )
insert into invoiceTree VALUES ( 208, 1361.267000, 188 )
insert into invoiceTree VALUES ( 209, 1360.244000, 189 )
insert into invoiceTree VALUES ( 210, 1359.221000, 190 )
insert into invoiceTree VALUES ( 211, 1358.198000, 191 )
insert into invoiceTree VALUES ( 212, 1357.175000, 192 )
insert into invoiceTree VALUES ( 213, 1356.152000, 193 )
insert into invoiceTree VALUES ( 214, 1355.128000, 194 )
insert into invoiceTree VALUES ( 215, 1354.104000, 195 )
insert into invoiceTree VALUES ( 216, 1353.080000, 196 )
insert into invoiceTree VALUES ( 217, 1352.056000, 197 )
insert into invoiceTree VALUES ( 218, 1351.032000, 198 )
insert into invoiceTree VALUES ( 219, 1350.007000, 199 )
insert into invoiceTree VALUES ( 220, 1348.982000, 200 )
insert into invoiceTree VALUES ( 221, 1347.957000, 201 )
insert into invoiceTree VALUES ( 222, 1346.931000, 202 )
insert into invoiceTree VALUES ( 223, 1345.905000, 203 )
insert into invoiceTree VALUES ( 224, 1344.879000, 204 )
insert into invoiceTree VALUES ( 225, 1343.853000, 205 )
insert into invoiceTree VALUES ( 226, 1342.827000, 206 )
insert into invoiceTree VALUES ( 227, 1341.800000, 207 )
insert into invoiceTree VALUES ( 228, 1340.773000, 208 )
insert into invoiceTree VALUES ( 229, 1339.746000, 209 )
insert into invoiceTree VALUES ( 230, 1338.719000, 210 )
insert into invoiceTree VALUES ( 231, 1337.691000, 211 )
insert into invoiceTree VALUES ( 232, 1336.663000, 212 )
insert into invoiceTree VALUES ( 233, 1335.635000, 213 )
insert into invoiceTree VALUES ( 234, 1334.606000, 214 )
insert into invoiceTree VALUES ( 235, 1333.578000, 215 )
insert into invoiceTree VALUES ( 236, 1332.549000, 216 )
insert into invoiceTree VALUES ( 237, 1331.520000, 217 )
insert into invoiceTree VALUES ( 238, 1330.490000, 218 )
insert into invoiceTree VALUES ( 239, 1329.460000, 219 )
insert into invoiceTree VALUES ( 240, 1328.430000, 220 )
insert into invoiceTree VALUES ( 241, 1327.400000, 221 )
insert into invoiceTree VALUES ( 242, 1326.370000, 222 )
insert into invoiceTree VALUES ( 243, 1325.339000, 223 )
insert into invoiceTree VALUES ( 244, 1324.308000, 224 )
insert into invoiceTree VALUES ( 245, 1323.277000, 225 )
insert into invoiceTree VALUES ( 246, 1322.245000, 226 )
insert into invoiceTree VALUES ( 247, 1321.213000, 227 )
insert into invoiceTree VALUES ( 248, 1320.181000, 228 )
insert into invoiceTree VALUES ( 249, 1319.149000, 229 )
insert into invoiceTree VALUES ( 250, 1318.116000, 230 )
insert into invoiceTree VALUES ( 251, 1317.083000, 231 )
insert into invoiceTree VALUES ( 252, 1316.050000, 232 )
insert into invoiceTree VALUES ( 253, 1315.016000, 233 )
insert into invoiceTree VALUES ( 254, 1313.983000, 234 )
insert into invoiceTree VALUES ( 255, 1312.949000, 235 )
insert into invoiceTree VALUES ( 256, 1311.914000, 236 )
insert into invoiceTree VALUES ( 257, 1310.880000, 237 )
insert into invoiceTree VALUES ( 258, 1309.845000, 238 )
insert into invoiceTree VALUES ( 259, 1308.810000, 239 )
insert into invoiceTree VALUES ( 260, 1307.774000, 240 )
insert into invoiceTree VALUES ( 261, 1306.738000, 241 )
insert into invoiceTree VALUES ( 262, 1305.702000, 242 )
insert into invoiceTree VALUES ( 263, 1304.666000, 243 )
insert into invoiceTree VALUES ( 264, 1303.629000, 244 )
insert into invoiceTree VALUES ( 265, 1302.592000, 245 )
insert into invoiceTree VALUES ( 266, 1301.555000, 246 )
insert into invoiceTree VALUES ( 267, 1300.518000, 247 )
insert into invoiceTree VALUES ( 268, 1299.480000, 248 )
insert into invoiceTree VALUES ( 269, 1298.442000, 249 )
insert into invoiceTree VALUES ( 270, 1297.403000, 250 )
insert into invoiceTree VALUES ( 271, 1296.365000, 251 )
insert into invoiceTree VALUES ( 272, 1295.326000, 252 )
insert into invoiceTree VALUES ( 273, 1294.286000, 253 )
insert into invoiceTree VALUES ( 274, 1293.247000, 254 )
insert into invoiceTree VALUES ( 275, 1292.207000, 255 )
insert into invoiceTree VALUES ( 276, 1291.166000, 256 )
insert into invoiceTree VALUES ( 277, 1290.126000, 257 )
insert into invoiceTree VALUES ( 278, 1289.085000, 258 )
insert into invoiceTree VALUES ( 279, 1288.044000, 259 )
insert into invoiceTree VALUES ( 280, 1287.002000, 260 )
insert into invoiceTree VALUES ( 281, 1285.960000, 261 )
insert into invoiceTree VALUES ( 282, 1284.918000, 262 )
insert into invoiceTree VALUES ( 283, 1283.876000, 263 )
insert into invoiceTree VALUES ( 284, 1282.833000, 264 )
insert into invoiceTree VALUES ( 285, 1281.790000, 265 )
insert into invoiceTree VALUES ( 286, 1280.746000, 266 )
insert into invoiceTree VALUES ( 287, 1279.703000, 267 )
insert into invoiceTree VALUES ( 288, 1278.659000, 268 )
insert into invoiceTree VALUES ( 289, 1277.614000, 269 )
insert into invoiceTree VALUES ( 290, 1276.569000, 270 )
insert into invoiceTree VALUES ( 291, 1275.524000, 271 )
insert into invoiceTree VALUES ( 292, 1274.479000, 272 )
insert into invoiceTree VALUES ( 293, 1273.433000, 273 )
insert into invoiceTree VALUES ( 294, 1272.387000, 274 )
insert into invoiceTree VALUES ( 295, 1271.341000, 275 )
insert into invoiceTree VALUES ( 296, 1270.294000, 276 )
insert into invoiceTree VALUES ( 297, 1269.247000, 277 )
insert into invoiceTree VALUES ( 298, 1268.200000, 278 )
insert into invoiceTree VALUES ( 299, 1267.152000, 279 )
insert into invoiceTree VALUES ( 300, 1266.104000, 280 )
insert into invoiceTree VALUES ( 301, 1265.055000, 281 )
insert into invoiceTree VALUES ( 302, 1264.006000, 282 )
insert into invoiceTree VALUES ( 303, 1262.957000, 283 )
insert into invoiceTree VALUES ( 304, 1261.908000, 284 )
insert into invoiceTree VALUES ( 305, 1260.858000, 285 )
insert into invoiceTree VALUES ( 306, 1259.808000, 286 )
insert into invoiceTree VALUES ( 307, 1258.757000, 287 )
insert into invoiceTree VALUES ( 308, 1257.706000, 288 )
insert into invoiceTree VALUES ( 309, 1256.655000, 289 )
insert into invoiceTree VALUES ( 310, 1255.603000, 290 )
insert into invoiceTree VALUES ( 311, 1254.551000, 291 )
insert into invoiceTree VALUES ( 312, 1253.499000, 292 )
insert into invoiceTree VALUES ( 313, 1252.446000, 293 )
insert into invoiceTree VALUES ( 314, 1251.393000, 294 )
insert into invoiceTree VALUES ( 315, 1250.340000, 295 )
insert into invoiceTree VALUES ( 316, 1249.286000, 296 )
insert into invoiceTree VALUES ( 317, 1248.232000, 297 )
insert into invoiceTree VALUES ( 318, 1247.177000, 298 )
insert into invoiceTree VALUES ( 319, 1246.122000, 299 )
insert into invoiceTree VALUES ( 320, 1245.067000, 300 )
insert into invoiceTree VALUES ( 321, 1244.011000, 301 )
insert into invoiceTree VALUES ( 322, 1242.955000, 302 )
insert into invoiceTree VALUES ( 323, 1241.899000, 303 )
insert into invoiceTree VALUES ( 324, 1240.842000, 304 )
insert into invoiceTree VALUES ( 325, 1239.785000, 305 )
insert into invoiceTree VALUES ( 326, 1238.727000, 306 )
insert into invoiceTree VALUES ( 327, 1237.669000, 307 )
insert into invoiceTree VALUES ( 328, 1236.611000, 308 )
insert into invoiceTree VALUES ( 329, 1235.552000, 309 )
insert into invoiceTree VALUES ( 330, 1234.493000, 310 )
insert into invoiceTree VALUES ( 331, 1233.433000, 311 )
insert into invoiceTree VALUES ( 332, 1232.373000, 312 )
insert into invoiceTree VALUES ( 333, 1231.313000, 313 )
insert into invoiceTree VALUES ( 334, 1230.252000, 314 )
insert into invoiceTree VALUES ( 335, 1229.191000, 315 )
insert into invoiceTree VALUES ( 336, 1228.130000, 316 )
insert into invoiceTree VALUES ( 337, 1227.068000, 317 )
insert into invoiceTree VALUES ( 338, 1226.005000, 318 )
insert into invoiceTree VALUES ( 339, 1224.943000, 319 )
insert into invoiceTree VALUES ( 340, 1223.879000, 320 )
insert into invoiceTree VALUES ( 341, 1222.816000, 321 )
insert into invoiceTree VALUES ( 342, 1221.752000, 322 )
insert into invoiceTree VALUES ( 343, 1220.688000, 323 )
insert into invoiceTree VALUES ( 344, 1219.623000, 324 )
insert into invoiceTree VALUES ( 345, 1218.558000, 325 )
insert into invoiceTree VALUES ( 346, 1217.492000, 326 )
insert into invoiceTree VALUES ( 347, 1216.426000, 327 )
insert into invoiceTree VALUES ( 348, 1215.359000, 328 )
insert into invoiceTree VALUES ( 349, 1214.293000, 329 )
insert into invoiceTree VALUES ( 350, 1213.225000, 330 )
insert into invoiceTree VALUES ( 351, 1212.157000, 331 )
insert into invoiceTree VALUES ( 352, 1211.089000, 332 )
insert into invoiceTree VALUES ( 353, 1210.021000, 333 )
insert into invoiceTree VALUES ( 354, 1208.952000, 334 )
insert into invoiceTree VALUES ( 355, 1207.882000, 335 )
insert into invoiceTree VALUES ( 356, 1206.812000, 336 )
insert into invoiceTree VALUES ( 357, 1205.742000, 337 )
insert into invoiceTree VALUES ( 358, 1204.671000, 338 )
insert into invoiceTree VALUES ( 359, 1203.600000, 339 )
insert into invoiceTree VALUES ( 360, 1202.528000, 340 )
insert into invoiceTree VALUES ( 361, 1201.456000, 341 )
insert into invoiceTree VALUES ( 362, 1200.384000, 342 )
insert into invoiceTree VALUES ( 363, 1199.311000, 343 )
insert into invoiceTree VALUES ( 364, 1198.237000, 344 )
insert into invoiceTree VALUES ( 365, 1197.164000, 345 )
insert into invoiceTree VALUES ( 366, 1196.089000, 346 )
insert into invoiceTree VALUES ( 367, 1195.014000, 347 )
insert into invoiceTree VALUES ( 368, 1193.939000, 348 )
insert into invoiceTree VALUES ( 369, 1192.863000, 349 )
insert into invoiceTree VALUES ( 370, 1191.787000, 350 )
insert into invoiceTree VALUES ( 371, 1190.711000, 351 )
insert into invoiceTree VALUES ( 372, 1189.634000, 352 )
insert into invoiceTree VALUES ( 373, 1188.556000, 353 )
insert into invoiceTree VALUES ( 374, 1187.478000, 354 )
insert into invoiceTree VALUES ( 375, 1186.400000, 355 )
insert into invoiceTree VALUES ( 376, 1185.321000, 356 )
insert into invoiceTree VALUES ( 377, 1184.241000, 357 )
insert into invoiceTree VALUES ( 378, 1183.161000, 358 )
insert into invoiceTree VALUES ( 379, 1182.081000, 359 )
insert into invoiceTree VALUES ( 380, 1181.000000, 360 )
insert into invoiceTree VALUES ( 381, 1179.919000, 361 )
insert into invoiceTree VALUES ( 382, 1178.837000, 362 )
insert into invoiceTree VALUES ( 383, 1177.755000, 363 )
insert into invoiceTree VALUES ( 384, 1176.672000, 364 )
insert into invoiceTree VALUES ( 385, 1175.589000, 365 )
insert into invoiceTree VALUES ( 386, 1174.505000, 366 )
insert into invoiceTree VALUES ( 387, 1173.420000, 367 )
insert into invoiceTree VALUES ( 388, 1172.336000, 368 )
insert into invoiceTree VALUES ( 389, 1171.250000, 369 )
insert into invoiceTree VALUES ( 390, 1170.165000, 370 )
insert into invoiceTree VALUES ( 391, 1169.078000, 371 )
insert into invoiceTree VALUES ( 392, 1167.992000, 372 )
insert into invoiceTree VALUES ( 393, 1166.904000, 373 )
insert into invoiceTree VALUES ( 394, 1165.817000, 374 )
insert into invoiceTree VALUES ( 395, 1164.728000, 375 )
insert into invoiceTree VALUES ( 396, 1163.640000, 376 )
insert into invoiceTree VALUES ( 397, 1162.550000, 377 )
insert into invoiceTree VALUES ( 398, 1161.461000, 378 )
insert into invoiceTree VALUES ( 399, 1160.370000, 379 )
insert into invoiceTree VALUES ( 400, 1159.279000, 380 )
insert into invoiceTree VALUES ( 401, 1158.188000, 381 )
insert into invoiceTree VALUES ( 402, 1157.096000, 382 )
insert into invoiceTree VALUES ( 403, 1156.004000, 383 )
insert into invoiceTree VALUES ( 404, 1154.911000, 384 )
insert into invoiceTree VALUES ( 405, 1153.817000, 385 )
insert into invoiceTree VALUES ( 406, 1152.724000, 386 )
insert into invoiceTree VALUES ( 407, 1151.629000, 387 )
insert into invoiceTree VALUES ( 408, 1150.534000, 388 )
insert into invoiceTree VALUES ( 409, 1149.438000, 389 )
insert into invoiceTree VALUES ( 410, 1148.342000, 390 )
insert into invoiceTree VALUES ( 411, 1147.246000, 391 )
insert into invoiceTree VALUES ( 412, 1146.148000, 392 )
insert into invoiceTree VALUES ( 413, 1145.051000, 393 )
insert into invoiceTree VALUES ( 414, 1143.952000, 394 )
insert into invoiceTree VALUES ( 415, 1142.854000, 395 )
insert into invoiceTree VALUES ( 416, 1141.754000, 396 )
insert into invoiceTree VALUES ( 417, 1140.654000, 397 )
insert into invoiceTree VALUES ( 418, 1139.554000, 398 )
insert into invoiceTree VALUES ( 419, 1138.453000, 399 )
insert into invoiceTree VALUES ( 420, 1137.351000, 400 )
insert into invoiceTree VALUES ( 421, 1136.249000, 401 )
insert into invoiceTree VALUES ( 422, 1135.146000, 402 )
insert into invoiceTree VALUES ( 423, 1134.043000, 403 )
insert into invoiceTree VALUES ( 424, 1132.939000, 404 )
insert into invoiceTree VALUES ( 425, 1131.834000, 405 )
insert into invoiceTree VALUES ( 426, 1130.729000, 406 )
insert into invoiceTree VALUES ( 427, 1129.624000, 407 )
insert into invoiceTree VALUES ( 428, 1128.518000, 408 )
insert into invoiceTree VALUES ( 429, 1127.411000, 409 )
insert into invoiceTree VALUES ( 430, 1126.304000, 410 )
insert into invoiceTree VALUES ( 431, 1125.196000, 411 )
insert into invoiceTree VALUES ( 432, 1124.087000, 412 )
insert into invoiceTree VALUES ( 433, 1122.978000, 413 )
insert into invoiceTree VALUES ( 434, 1121.868000, 414 )
insert into invoiceTree VALUES ( 435, 1120.758000, 415 )
insert into invoiceTree VALUES ( 436, 1119.647000, 416 )
insert into invoiceTree VALUES ( 437, 1118.536000, 417 )
insert into invoiceTree VALUES ( 438, 1117.424000, 418 )
insert into invoiceTree VALUES ( 439, 1116.311000, 419 )
insert into invoiceTree VALUES ( 440, 1115.198000, 420 )
insert into invoiceTree VALUES ( 441, 1114.084000, 421 )
insert into invoiceTree VALUES ( 442, 1112.969000, 422 )
insert into invoiceTree VALUES ( 443, 1111.854000, 423 )
insert into invoiceTree VALUES ( 444, 1110.738000, 424 )
insert into invoiceTree VALUES ( 445, 1109.622000, 425 )
insert into invoiceTree VALUES ( 446, 1108.505000, 426 )
insert into invoiceTree VALUES ( 447, 1107.388000, 427 )
insert into invoiceTree VALUES ( 448, 1106.269000, 428 )
insert into invoiceTree VALUES ( 449, 1105.150000, 429 )
insert into invoiceTree VALUES ( 450, 1104.031000, 430 )
insert into invoiceTree VALUES ( 451, 1102.911000, 431 )
insert into invoiceTree VALUES ( 452, 1101.790000, 432 )
insert into invoiceTree VALUES ( 453, 1100.669000, 433 )
insert into invoiceTree VALUES ( 454, 1099.547000, 434 )
insert into invoiceTree VALUES ( 455, 1098.424000, 435 )
insert into invoiceTree VALUES ( 456, 1097.301000, 436 )
insert into invoiceTree VALUES ( 457, 1096.177000, 437 )
insert into invoiceTree VALUES ( 458, 1095.052000, 438 )
insert into invoiceTree VALUES ( 459, 1093.927000, 439 )
insert into invoiceTree VALUES ( 460, 1092.801000, 440 )
insert into invoiceTree VALUES ( 461, 1091.675000, 441 )
insert into invoiceTree VALUES ( 462, 1090.547000, 442 )
insert into invoiceTree VALUES ( 463, 1089.419000, 443 )
insert into invoiceTree VALUES ( 464, 1088.291000, 444 )
insert into invoiceTree VALUES ( 465, 1087.162000, 445 )
insert into invoiceTree VALUES ( 466, 1086.032000, 446 )
insert into invoiceTree VALUES ( 467, 1084.901000, 447 )
insert into invoiceTree VALUES ( 468, 1083.770000, 448 )
insert into invoiceTree VALUES ( 469, 1082.638000, 449 )
insert into invoiceTree VALUES ( 470, 1081.506000, 450 )
insert into invoiceTree VALUES ( 471, 1080.372000, 451 )
insert into invoiceTree VALUES ( 472, 1079.238000, 452 )
insert into invoiceTree VALUES ( 473, 1078.104000, 453 )
insert into invoiceTree VALUES ( 474, 1076.968000, 454 )
insert into invoiceTree VALUES ( 475, 1075.832000, 455 )
insert into invoiceTree VALUES ( 476, 1074.696000, 456 )
insert into invoiceTree VALUES ( 477, 1073.558000, 457 )
insert into invoiceTree VALUES ( 478, 1072.420000, 458 )
insert into invoiceTree VALUES ( 479, 1071.281000, 459 )
insert into invoiceTree VALUES ( 480, 1070.142000, 460 )
insert into invoiceTree VALUES ( 481, 1069.001000, 461 )
insert into invoiceTree VALUES ( 482, 1067.860000, 462 )
insert into invoiceTree VALUES ( 483, 1066.719000, 463 )
insert into invoiceTree VALUES ( 484, 1065.576000, 464 )
insert into invoiceTree VALUES ( 485, 1064.433000, 465 )
insert into invoiceTree VALUES ( 486, 1063.289000, 466 )
insert into invoiceTree VALUES ( 487, 1062.145000, 467 )
insert into invoiceTree VALUES ( 488, 1060.999000, 468 )
insert into invoiceTree VALUES ( 489, 1059.853000, 469 )
insert into invoiceTree VALUES ( 490, 1058.707000, 470 )
insert into invoiceTree VALUES ( 491, 1057.559000, 471 )
insert into invoiceTree VALUES ( 492, 1056.411000, 472 )
insert into invoiceTree VALUES ( 493, 1055.262000, 473 )
insert into invoiceTree VALUES ( 494, 1054.112000, 474 )
insert into invoiceTree VALUES ( 495, 1052.961000, 475 )
insert into invoiceTree VALUES ( 496, 1051.810000, 476 )
insert into invoiceTree VALUES ( 497, 1050.658000, 477 )
insert into invoiceTree VALUES ( 498, 1049.505000, 478 )
insert into invoiceTree VALUES ( 499, 1048.352000, 479 )
insert into invoiceTree VALUES ( 500, 1047.198000, 480 )
insert into invoiceTree VALUES ( 501, 1046.042000, 481 )
insert into invoiceTree VALUES ( 502, 1044.887000, 482 )
insert into invoiceTree VALUES ( 503, 1043.730000, 483 )
insert into invoiceTree VALUES ( 504, 1042.573000, 484 )
insert into invoiceTree VALUES ( 505, 1041.414000, 485 )
insert into invoiceTree VALUES ( 506, 1040.255000, 486 )
insert into invoiceTree VALUES ( 507, 1039.096000, 487 )
insert into invoiceTree VALUES ( 508, 1037.935000, 488 )
insert into invoiceTree VALUES ( 509, 1036.774000, 489 )
insert into invoiceTree VALUES ( 510, 1035.612000, 490 )
insert into invoiceTree VALUES ( 511, 1034.449000, 491 )
insert into invoiceTree VALUES ( 512, 1033.285000, 492 )
insert into invoiceTree VALUES ( 513, 1032.120000, 493 )
insert into invoiceTree VALUES ( 514, 1030.955000, 494 )
insert into invoiceTree VALUES ( 515, 1029.789000, 495 )
insert into invoiceTree VALUES ( 516, 1028.622000, 496 )
insert into invoiceTree VALUES ( 517, 1027.454000, 497 )
insert into invoiceTree VALUES ( 518, 1026.285000, 498 )
insert into invoiceTree VALUES ( 519, 1025.116000, 499 )
insert into invoiceTree VALUES ( 520, 1023.945000, 500 )
insert into invoiceTree VALUES ( 521, 1022.774000, 501 )
insert into invoiceTree VALUES ( 522, 1021.602000, 502 )
insert into invoiceTree VALUES ( 523, 1020.429000, 503 )
insert into invoiceTree VALUES ( 524, 1019.256000, 504 )
insert into invoiceTree VALUES ( 525, 1018.081000, 505 )
insert into invoiceTree VALUES ( 526, 1016.906000, 506 )
insert into invoiceTree VALUES ( 527, 1015.730000, 507 )
insert into invoiceTree VALUES ( 528, 1014.553000, 508 )
insert into invoiceTree VALUES ( 529, 1013.375000, 509 )
insert into invoiceTree VALUES ( 530, 1012.196000, 510 )
insert into invoiceTree VALUES ( 531, 1011.016000, 511 )
insert into invoiceTree VALUES ( 532, 1009.836000, 512 )
insert into invoiceTree VALUES ( 533, 1008.654000, 513 )
insert into invoiceTree VALUES ( 534, 1007.472000, 514 )
insert into invoiceTree VALUES ( 535, 1006.289000, 515 )
insert into invoiceTree VALUES ( 536, 1005.104000, 516 )
insert into invoiceTree VALUES ( 537, 1003.920000, 517 )
insert into invoiceTree VALUES ( 538, 1002.734000, 518 )
insert into invoiceTree VALUES ( 539, 1001.547000, 519 )
insert into invoiceTree VALUES ( 540, 1000.359000, 520 )
insert into invoiceTree VALUES ( 541, 999.171000, 521 )
insert into invoiceTree VALUES ( 542, 997.981000, 522 )
insert into invoiceTree VALUES ( 543, 996.791000, 523 )
insert into invoiceTree VALUES ( 544, 995.599000, 524 )
insert into invoiceTree VALUES ( 545, 994.407000, 525 )
insert into invoiceTree VALUES ( 546, 993.214000, 526 )
insert into invoiceTree VALUES ( 547, 992.020000, 527 )
insert into invoiceTree VALUES ( 548, 990.825000, 528 )
insert into invoiceTree VALUES ( 549, 989.629000, 529 )
insert into invoiceTree VALUES ( 550, 988.432000, 530 )
insert into invoiceTree VALUES ( 551, 987.234000, 531 )
insert into invoiceTree VALUES ( 552, 986.035000, 532 )
insert into invoiceTree VALUES ( 553, 984.836000, 533 )
insert into invoiceTree VALUES ( 554, 983.635000, 534 )
insert into invoiceTree VALUES ( 555, 982.433000, 535 )
insert into invoiceTree VALUES ( 556, 981.231000, 536 )
insert into invoiceTree VALUES ( 557, 980.027000, 537 )
insert into invoiceTree VALUES ( 558, 978.823000, 538 )
insert into invoiceTree VALUES ( 559, 977.617000, 539 )
insert into invoiceTree VALUES ( 560, 976.411000, 540 )
insert into invoiceTree VALUES ( 561, 975.203000, 541 )
insert into invoiceTree VALUES ( 562, 973.995000, 542 )
insert into invoiceTree VALUES ( 563, 972.785000, 543 )
insert into invoiceTree VALUES ( 564, 971.575000, 544 )
insert into invoiceTree VALUES ( 565, 970.363000, 545 )
insert into invoiceTree VALUES ( 566, 969.151000, 546 )
insert into invoiceTree VALUES ( 567, 967.937000, 547 )
insert into invoiceTree VALUES ( 568, 966.723000, 548 )
insert into invoiceTree VALUES ( 569, 965.507000, 549 )
insert into invoiceTree VALUES ( 570, 964.290000, 550 )
insert into invoiceTree VALUES ( 571, 963.073000, 551 )
insert into invoiceTree VALUES ( 572, 961.854000, 552 )
insert into invoiceTree VALUES ( 573, 960.635000, 553 )
insert into invoiceTree VALUES ( 574, 959.414000, 554 )
insert into invoiceTree VALUES ( 575, 958.192000, 555 )
insert into invoiceTree VALUES ( 576, 956.969000, 556 )
insert into invoiceTree VALUES ( 577, 955.746000, 557 )
insert into invoiceTree VALUES ( 578, 954.521000, 558 )
insert into invoiceTree VALUES ( 579, 953.295000, 559 )
insert into invoiceTree VALUES ( 580, 952.068000, 560 )
insert into invoiceTree VALUES ( 581, 950.840000, 561 )
insert into invoiceTree VALUES ( 582, 949.610000, 562 )
insert into invoiceTree VALUES ( 583, 948.380000, 563 )
insert into invoiceTree VALUES ( 584, 947.149000, 564 )
insert into invoiceTree VALUES ( 585, 945.916000, 565 )
insert into invoiceTree VALUES ( 586, 944.683000, 566 )
insert into invoiceTree VALUES ( 587, 943.448000, 567 )
insert into invoiceTree VALUES ( 588, 942.212000, 568 )
insert into invoiceTree VALUES ( 589, 940.975000, 569 )
insert into invoiceTree VALUES ( 590, 939.737000, 570 )
insert into invoiceTree VALUES ( 591, 938.498000, 571 )
insert into invoiceTree VALUES ( 592, 937.258000, 572 )
insert into invoiceTree VALUES ( 593, 936.017000, 573 )
insert into invoiceTree VALUES ( 594, 934.774000, 574 )
insert into invoiceTree VALUES ( 595, 933.531000, 575 )
insert into invoiceTree VALUES ( 596, 932.286000, 576 )
insert into invoiceTree VALUES ( 597, 931.040000, 577 )
insert into invoiceTree VALUES ( 598, 929.793000, 578 )
insert into invoiceTree VALUES ( 599, 928.545000, 579 )
insert into invoiceTree VALUES ( 600, 927.295000, 580 )
insert into invoiceTree VALUES ( 601, 926.045000, 581 )
insert into invoiceTree VALUES ( 602, 924.793000, 582 )
insert into invoiceTree VALUES ( 603, 923.540000, 583 )
insert into invoiceTree VALUES ( 604, 922.286000, 584 )
insert into invoiceTree VALUES ( 605, 921.030000, 585 )
insert into invoiceTree VALUES ( 606, 919.774000, 586 )
insert into invoiceTree VALUES ( 607, 918.516000, 587 )
insert into invoiceTree VALUES ( 608, 917.257000, 588 )
insert into invoiceTree VALUES ( 609, 915.997000, 589 )
insert into invoiceTree VALUES ( 610, 914.736000, 590 )
insert into invoiceTree VALUES ( 611, 913.473000, 591 )
insert into invoiceTree VALUES ( 612, 912.209000, 592 )
insert into invoiceTree VALUES ( 613, 910.944000, 593 )
insert into invoiceTree VALUES ( 614, 909.678000, 594 )
insert into invoiceTree VALUES ( 615, 908.410000, 595 )
insert into invoiceTree VALUES ( 616, 907.142000, 596 )
insert into invoiceTree VALUES ( 617, 905.871000, 597 )
insert into invoiceTree VALUES ( 618, 904.600000, 598 )
insert into invoiceTree VALUES ( 619, 903.328000, 599 )
insert into invoiceTree VALUES ( 620, 902.054000, 600 )
insert into invoiceTree VALUES ( 621, 900.778000, 601 )
insert into invoiceTree VALUES ( 622, 899.502000, 602 )
insert into invoiceTree VALUES ( 623, 898.224000, 603 )
insert into invoiceTree VALUES ( 624, 896.945000, 604 )
insert into invoiceTree VALUES ( 625, 895.665000, 605 )
insert into invoiceTree VALUES ( 626, 894.383000, 606 )
insert into invoiceTree VALUES ( 627, 893.100000, 607 )
insert into invoiceTree VALUES ( 628, 891.816000, 608 )
insert into invoiceTree VALUES ( 629, 890.530000, 609 )
insert into invoiceTree VALUES ( 630, 889.243000, 610 )
insert into invoiceTree VALUES ( 631, 887.955000, 611 )
insert into invoiceTree VALUES ( 632, 886.665000, 612 )
insert into invoiceTree VALUES ( 633, 885.374000, 613 )
insert into invoiceTree VALUES ( 634, 884.082000, 614 )
insert into invoiceTree VALUES ( 635, 882.788000, 615 )
insert into invoiceTree VALUES ( 636, 881.493000, 616 )
insert into invoiceTree VALUES ( 637, 880.196000, 617 )
insert into invoiceTree VALUES ( 638, 878.898000, 618 )
insert into invoiceTree VALUES ( 639, 877.599000, 619 )
insert into invoiceTree VALUES ( 640, 876.298000, 620 )
insert into invoiceTree VALUES ( 641, 874.996000, 621 )
insert into invoiceTree VALUES ( 642, 873.692000, 622 )
insert into invoiceTree VALUES ( 643, 872.387000, 623 )
insert into invoiceTree VALUES ( 644, 871.081000, 624 )
insert into invoiceTree VALUES ( 645, 869.773000, 625 )
insert into invoiceTree VALUES ( 646, 868.464000, 626 )
insert into invoiceTree VALUES ( 647, 867.153000, 627 )
insert into invoiceTree VALUES ( 648, 865.841000, 628 )
insert into invoiceTree VALUES ( 649, 864.527000, 629 )
insert into invoiceTree VALUES ( 650, 863.212000, 630 )
insert into invoiceTree VALUES ( 651, 861.895000, 631 )
insert into invoiceTree VALUES ( 652, 860.577000, 632 )
insert into invoiceTree VALUES ( 653, 859.257000, 633 )
insert into invoiceTree VALUES ( 654, 857.936000, 634 )
insert into invoiceTree VALUES ( 655, 856.614000, 635 )
insert into invoiceTree VALUES ( 656, 855.290000, 636 )
insert into invoiceTree VALUES ( 657, 853.964000, 637 )
insert into invoiceTree VALUES ( 658, 852.637000, 638 )
insert into invoiceTree VALUES ( 659, 851.308000, 639 )
insert into invoiceTree VALUES ( 660, 849.978000, 640 )
insert into invoiceTree VALUES ( 661, 848.646000, 641 )
insert into invoiceTree VALUES ( 662, 847.312000, 642 )
insert into invoiceTree VALUES ( 663, 845.977000, 643 )
insert into invoiceTree VALUES ( 664, 844.641000, 644 )
insert into invoiceTree VALUES ( 665, 843.303000, 645 )
insert into invoiceTree VALUES ( 666, 841.963000, 646 )
insert into invoiceTree VALUES ( 667, 840.621000, 647 )
insert into invoiceTree VALUES ( 668, 839.278000, 648 )
insert into invoiceTree VALUES ( 669, 837.934000, 649 )
insert into invoiceTree VALUES ( 670, 836.588000, 650 )
insert into invoiceTree VALUES ( 671, 835.240000, 651 )
insert into invoiceTree VALUES ( 672, 833.890000, 652 )
insert into invoiceTree VALUES ( 673, 832.539000, 653 )
insert into invoiceTree VALUES ( 674, 831.186000, 654 )
insert into invoiceTree VALUES ( 675, 829.832000, 655 )
insert into invoiceTree VALUES ( 676, 828.475000, 656 )
insert into invoiceTree VALUES ( 677, 827.118000, 657 )
insert into invoiceTree VALUES ( 678, 825.758000, 658 )
insert into invoiceTree VALUES ( 679, 824.397000, 659 )
insert into invoiceTree VALUES ( 680, 823.034000, 660 )
insert into invoiceTree VALUES ( 681, 821.669000, 661 )
insert into invoiceTree VALUES ( 682, 820.303000, 662 )
insert into invoiceTree VALUES ( 683, 818.934000, 663 )
insert into invoiceTree VALUES ( 684, 817.564000, 664 )
insert into invoiceTree VALUES ( 685, 816.193000, 665 )
insert into invoiceTree VALUES ( 686, 814.819000, 666 )
insert into invoiceTree VALUES ( 687, 813.444000, 667 )
insert into invoiceTree VALUES ( 688, 812.067000, 668 )
insert into invoiceTree VALUES ( 689, 810.688000, 669 )
insert into invoiceTree VALUES ( 690, 809.307000, 670 )
insert into invoiceTree VALUES ( 691, 807.925000, 671 )
insert into invoiceTree VALUES ( 692, 806.540000, 672 )
insert into invoiceTree VALUES ( 693, 805.154000, 673 )
insert into invoiceTree VALUES ( 694, 803.766000, 674 )
insert into invoiceTree VALUES ( 695, 802.376000, 675 )
insert into invoiceTree VALUES ( 696, 800.985000, 676 )
insert into invoiceTree VALUES ( 697, 799.591000, 677 )
insert into invoiceTree VALUES ( 698, 798.196000, 678 )
insert into invoiceTree VALUES ( 699, 796.798000, 679 )
insert into invoiceTree VALUES ( 700, 795.399000, 680 )
insert into invoiceTree VALUES ( 701, 793.998000, 681 )
insert into invoiceTree VALUES ( 702, 792.594000, 682 )
insert into invoiceTree VALUES ( 703, 791.189000, 683 )
insert into invoiceTree VALUES ( 704, 789.782000, 684 )
insert into invoiceTree VALUES ( 705, 788.373000, 685 )
insert into invoiceTree VALUES ( 706, 786.962000, 686 )
insert into invoiceTree VALUES ( 707, 785.549000, 687 )
insert into invoiceTree VALUES ( 708, 784.134000, 688 )
insert into invoiceTree VALUES ( 709, 782.717000, 689 )
insert into invoiceTree VALUES ( 710, 781.298000, 690 )
insert into invoiceTree VALUES ( 711, 779.877000, 691 )
insert into invoiceTree VALUES ( 712, 778.454000, 692 )
insert into invoiceTree VALUES ( 713, 777.029000, 693 )
insert into invoiceTree VALUES ( 714, 775.602000, 694 )
insert into invoiceTree VALUES ( 715, 774.172000, 695 )
insert into invoiceTree VALUES ( 716, 772.741000, 696 )
insert into invoiceTree VALUES ( 717, 771.307000, 697 )
insert into invoiceTree VALUES ( 718, 769.872000, 698 )
insert into invoiceTree VALUES ( 719, 768.434000, 699 )
insert into invoiceTree VALUES ( 720, 766.994000, 700 )
insert into invoiceTree VALUES ( 721, 765.552000, 701 )
insert into invoiceTree VALUES ( 722, 764.108000, 702 )
insert into invoiceTree VALUES ( 723, 762.661000, 703 )
insert into invoiceTree VALUES ( 724, 761.213000, 704 )
insert into invoiceTree VALUES ( 725, 759.762000, 705 )
insert into invoiceTree VALUES ( 726, 758.309000, 706 )
insert into invoiceTree VALUES ( 727, 756.854000, 707 )
insert into invoiceTree VALUES ( 728, 755.396000, 708 )
insert into invoiceTree VALUES ( 729, 753.936000, 709 )
insert into invoiceTree VALUES ( 730, 752.474000, 710 )
insert into invoiceTree VALUES ( 731, 751.010000, 711 )
insert into invoiceTree VALUES ( 732, 749.543000, 712 )
insert into invoiceTree VALUES ( 733, 748.075000, 713 )
insert into invoiceTree VALUES ( 734, 746.603000, 714 )
insert into invoiceTree VALUES ( 735, 745.130000, 715 )
insert into invoiceTree VALUES ( 736, 743.654000, 716 )
insert into invoiceTree VALUES ( 737, 742.175000, 717 )
insert into invoiceTree VALUES ( 738, 740.695000, 718 )
insert into invoiceTree VALUES ( 739, 739.212000, 719 )
insert into invoiceTree VALUES ( 740, 737.726000, 720 )
insert into invoiceTree VALUES ( 741, 736.238000, 721 )
insert into invoiceTree VALUES ( 742, 734.748000, 722 )
insert into invoiceTree VALUES ( 743, 733.255000, 723 )
insert into invoiceTree VALUES ( 744, 731.759000, 724 )
insert into invoiceTree VALUES ( 745, 730.261000, 725 )
insert into invoiceTree VALUES ( 746, 728.761000, 726 )
insert into invoiceTree VALUES ( 747, 727.258000, 727 )
insert into invoiceTree VALUES ( 748, 725.753000, 728 )
insert into invoiceTree VALUES ( 749, 724.245000, 729 )
insert into invoiceTree VALUES ( 750, 722.734000, 730 )
insert into invoiceTree VALUES ( 751, 721.221000, 731 )
insert into invoiceTree VALUES ( 752, 719.705000, 732 )
insert into invoiceTree VALUES ( 753, 718.187000, 733 )
insert into invoiceTree VALUES ( 754, 716.666000, 734 )
insert into invoiceTree VALUES ( 755, 715.142000, 735 )
insert into invoiceTree VALUES ( 756, 713.616000, 736 )
insert into invoiceTree VALUES ( 757, 712.087000, 737 )
insert into invoiceTree VALUES ( 758, 710.555000, 738 )
insert into invoiceTree VALUES ( 759, 709.020000, 739 )
insert into invoiceTree VALUES ( 760, 707.483000, 740 )
insert into invoiceTree VALUES ( 761, 705.943000, 741 )
insert into invoiceTree VALUES ( 762, 704.400000, 742 )
insert into invoiceTree VALUES ( 763, 702.855000, 743 )
insert into invoiceTree VALUES ( 764, 701.306000, 744 )
insert into invoiceTree VALUES ( 765, 699.755000, 745 )
insert into invoiceTree VALUES ( 766, 698.201000, 746 )
insert into invoiceTree VALUES ( 767, 696.644000, 747 )
insert into invoiceTree VALUES ( 768, 695.084000, 748 )
insert into invoiceTree VALUES ( 769, 693.521000, 749 )
insert into invoiceTree VALUES ( 770, 691.955000, 750 )
insert into invoiceTree VALUES ( 771, 690.386000, 751 )
insert into invoiceTree VALUES ( 772, 688.815000, 752 )
insert into invoiceTree VALUES ( 773, 687.240000, 753 )
insert into invoiceTree VALUES ( 774, 685.662000, 754 )
insert into invoiceTree VALUES ( 775, 684.081000, 755 )
insert into invoiceTree VALUES ( 776, 682.497000, 756 )
insert into invoiceTree VALUES ( 777, 680.910000, 757 )
insert into invoiceTree VALUES ( 778, 679.320000, 758 )
insert into invoiceTree VALUES ( 779, 677.727000, 759 )
insert into invoiceTree VALUES ( 780, 676.131000, 760 )
insert into invoiceTree VALUES ( 781, 674.531000, 761 )
insert into invoiceTree VALUES ( 782, 672.928000, 762 )
insert into invoiceTree VALUES ( 783, 671.322000, 763 )
insert into invoiceTree VALUES ( 784, 669.713000, 764 )
insert into invoiceTree VALUES ( 785, 668.100000, 765 )
insert into invoiceTree VALUES ( 786, 666.484000, 766 )
insert into invoiceTree VALUES ( 787, 664.865000, 767 )
insert into invoiceTree VALUES ( 788, 663.243000, 768 )
insert into invoiceTree VALUES ( 789, 661.617000, 769 )
insert into invoiceTree VALUES ( 790, 659.987000, 770 )
insert into invoiceTree VALUES ( 791, 658.355000, 771 )
insert into invoiceTree VALUES ( 792, 656.718000, 772 )
insert into invoiceTree VALUES ( 793, 655.079000, 773 )
insert into invoiceTree VALUES ( 794, 653.435000, 774 )
insert into invoiceTree VALUES ( 795, 651.789000, 775 )
insert into invoiceTree VALUES ( 796, 650.138000, 776 )
insert into invoiceTree VALUES ( 797, 648.485000, 777 )
insert into invoiceTree VALUES ( 798, 646.827000, 778 )
insert into invoiceTree VALUES ( 799, 645.166000, 779 )
insert into invoiceTree VALUES ( 800, 643.501000, 780 )
insert into invoiceTree VALUES ( 801, 641.833000, 781 )
insert into invoiceTree VALUES ( 802, 640.160000, 782 )
insert into invoiceTree VALUES ( 803, 638.484000, 783 )
insert into invoiceTree VALUES ( 804, 636.804000, 784 )
insert into invoiceTree VALUES ( 805, 635.121000, 785 )
insert into invoiceTree VALUES ( 806, 633.433000, 786 )
insert into invoiceTree VALUES ( 807, 631.742000, 787 )
insert into invoiceTree VALUES ( 808, 630.047000, 788 )
insert into invoiceTree VALUES ( 809, 628.347000, 789 )
insert into invoiceTree VALUES ( 810, 626.644000, 790 )
insert into invoiceTree VALUES ( 811, 624.937000, 791 )
insert into invoiceTree VALUES ( 812, 623.226000, 792 )
insert into invoiceTree VALUES ( 813, 621.510000, 793 )
insert into invoiceTree VALUES ( 814, 619.791000, 794 )
insert into invoiceTree VALUES ( 815, 618.067000, 795 )
insert into invoiceTree VALUES ( 816, 616.339000, 796 )
insert into invoiceTree VALUES ( 817, 614.607000, 797 )
insert into invoiceTree VALUES ( 818, 612.871000, 798 )
insert into invoiceTree VALUES ( 819, 611.130000, 799 )
insert into invoiceTree VALUES ( 820, 609.385000, 800 )
insert into invoiceTree VALUES ( 821, 607.636000, 801 )
insert into invoiceTree VALUES ( 822, 605.882000, 802 )
insert into invoiceTree VALUES ( 823, 604.124000, 803 )
insert into invoiceTree VALUES ( 824, 602.361000, 804 )
insert into invoiceTree VALUES ( 825, 600.594000, 805 )
insert into invoiceTree VALUES ( 826, 598.822000, 806 )
insert into invoiceTree VALUES ( 827, 597.046000, 807 )
insert into invoiceTree VALUES ( 828, 595.265000, 808 )
insert into invoiceTree VALUES ( 829, 593.479000, 809 )
insert into invoiceTree VALUES ( 830, 591.689000, 810 )
insert into invoiceTree VALUES ( 831, 589.893000, 811 )
insert into invoiceTree VALUES ( 832, 588.093000, 812 )
insert into invoiceTree VALUES ( 833, 586.288000, 813 )
insert into invoiceTree VALUES ( 834, 584.478000, 814 )
insert into invoiceTree VALUES ( 835, 582.664000, 815 )
insert into invoiceTree VALUES ( 836, 580.844000, 816 )
insert into invoiceTree VALUES ( 837, 579.019000, 817 )
insert into invoiceTree VALUES ( 838, 577.189000, 818 )
insert into invoiceTree VALUES ( 839, 575.354000, 819 )
insert into invoiceTree VALUES ( 840, 573.513000, 820 )
insert into invoiceTree VALUES ( 841, 571.667000, 821 )
insert into invoiceTree VALUES ( 842, 569.816000, 822 )
insert into invoiceTree VALUES ( 843, 567.960000, 823 )
insert into invoiceTree VALUES ( 844, 566.098000, 824 )
insert into invoiceTree VALUES ( 845, 564.231000, 825 )
insert into invoiceTree VALUES ( 846, 562.358000, 826 )
insert into invoiceTree VALUES ( 847, 560.480000, 827 )
insert into invoiceTree VALUES ( 848, 558.596000, 828 )
insert into invoiceTree VALUES ( 849, 556.706000, 829 )
insert into invoiceTree VALUES ( 850, 554.811000, 830 )
insert into invoiceTree VALUES ( 851, 552.910000, 831 )
insert into invoiceTree VALUES ( 852, 551.003000, 832 )
insert into invoiceTree VALUES ( 853, 549.090000, 833 )
insert into invoiceTree VALUES ( 854, 547.171000, 834 )
insert into invoiceTree VALUES ( 855, 545.245000, 835 )
insert into invoiceTree VALUES ( 856, 543.314000, 836 )
insert into invoiceTree VALUES ( 857, 541.377000, 837 )
insert into invoiceTree VALUES ( 858, 539.433000, 838 )
insert into invoiceTree VALUES ( 859, 537.483000, 839 )
insert into invoiceTree VALUES ( 860, 535.527000, 840 )
insert into invoiceTree VALUES ( 861, 533.564000, 841 )
insert into invoiceTree VALUES ( 862, 531.594000, 842 )
insert into invoiceTree VALUES ( 863, 529.618000, 843 )
insert into invoiceTree VALUES ( 864, 527.635000, 844 )
insert into invoiceTree VALUES ( 865, 525.646000, 845 )
insert into invoiceTree VALUES ( 866, 523.650000, 846 )
insert into invoiceTree VALUES ( 867, 521.646000, 847 )
insert into invoiceTree VALUES ( 868, 519.636000, 848 )
insert into invoiceTree VALUES ( 869, 517.619000, 849 )
insert into invoiceTree VALUES ( 870, 515.594000, 850 )
insert into invoiceTree VALUES ( 871, 513.562000, 851 )
insert into invoiceTree VALUES ( 872, 511.523000, 852 )
insert into invoiceTree VALUES ( 873, 509.476000, 853 )
insert into invoiceTree VALUES ( 874, 507.422000, 854 )
insert into invoiceTree VALUES ( 875, 505.361000, 855 )
insert into invoiceTree VALUES ( 876, 503.291000, 856 )
insert into invoiceTree VALUES ( 877, 501.214000, 857 )
insert into invoiceTree VALUES ( 878, 499.129000, 858 )
insert into invoiceTree VALUES ( 879, 497.035000, 859 )
insert into invoiceTree VALUES ( 880, 494.934000, 860 )
insert into invoiceTree VALUES ( 881, 492.825000, 861 )
insert into invoiceTree VALUES ( 882, 490.707000, 862 )
insert into invoiceTree VALUES ( 883, 488.581000, 863 )
insert into invoiceTree VALUES ( 884, 486.446000, 864 )
insert into invoiceTree VALUES ( 885, 484.302000, 865 )
insert into invoiceTree VALUES ( 886, 482.150000, 866 )
insert into invoiceTree VALUES ( 887, 479.989000, 867 )
insert into invoiceTree VALUES ( 888, 477.819000, 868 )
insert into invoiceTree VALUES ( 889, 475.640000, 869 )
insert into invoiceTree VALUES ( 890, 473.451000, 870 )
insert into invoiceTree VALUES ( 891, 471.253000, 871 )
insert into invoiceTree VALUES ( 892, 469.046000, 872 )
insert into invoiceTree VALUES ( 893, 466.829000, 873 )
insert into invoiceTree VALUES ( 894, 464.602000, 874 )
insert into invoiceTree VALUES ( 895, 462.365000, 875 )
insert into invoiceTree VALUES ( 896, 460.118000, 876 )
insert into invoiceTree VALUES ( 897, 457.861000, 877 )
insert into invoiceTree VALUES ( 898, 455.594000, 878 )
insert into invoiceTree VALUES ( 899, 453.316000, 879 )
insert into invoiceTree VALUES ( 900, 451.027000, 880 )
insert into invoiceTree VALUES ( 901, 448.727000, 881 )
insert into invoiceTree VALUES ( 902, 446.417000, 882 )
insert into invoiceTree VALUES ( 903, 444.095000, 883 )
insert into invoiceTree VALUES ( 904, 441.761000, 884 )
insert into invoiceTree VALUES ( 905, 439.417000, 885 )
insert into invoiceTree VALUES ( 906, 437.060000, 886 )
insert into invoiceTree VALUES ( 907, 434.692000, 887 )
insert into invoiceTree VALUES ( 908, 432.311000, 888 )
insert into invoiceTree VALUES ( 909, 429.918000, 889 )
insert into invoiceTree VALUES ( 910, 427.512000, 890 )
insert into invoiceTree VALUES ( 911, 425.094000, 891 )
insert into invoiceTree VALUES ( 912, 422.663000, 892 )
insert into invoiceTree VALUES ( 913, 420.218000, 893 )
insert into invoiceTree VALUES ( 914, 417.760000, 894 )
insert into invoiceTree VALUES ( 915, 415.288000, 895 )
insert into invoiceTree VALUES ( 916, 412.803000, 896 )
insert into invoiceTree VALUES ( 917, 410.303000, 897 )
insert into invoiceTree VALUES ( 918, 407.789000, 898 )
insert into invoiceTree VALUES ( 919, 405.260000, 899 )
insert into invoiceTree VALUES ( 920, 402.716000, 900 )
insert into invoiceTree VALUES ( 921, 400.157000, 901 )
insert into invoiceTree VALUES ( 922, 397.582000, 902 )
insert into invoiceTree VALUES ( 923, 394.991000, 903 )
insert into invoiceTree VALUES ( 924, 392.384000, 904 )
insert into invoiceTree VALUES ( 925, 389.761000, 905 )
insert into invoiceTree VALUES ( 926, 387.120000, 906 )
insert into invoiceTree VALUES ( 927, 384.463000, 907 )
insert into invoiceTree VALUES ( 928, 381.788000, 908 )
insert into invoiceTree VALUES ( 929, 379.095000, 909 )
insert into invoiceTree VALUES ( 930, 376.383000, 910 )
insert into invoiceTree VALUES ( 931, 373.653000, 911 )
insert into invoiceTree VALUES ( 932, 370.904000, 912 )
insert into invoiceTree VALUES ( 933, 368.135000, 913 )
insert into invoiceTree VALUES ( 934, 365.347000, 914 )
insert into invoiceTree VALUES ( 935, 362.537000, 915 )
insert into invoiceTree VALUES ( 936, 359.707000, 916 )
insert into invoiceTree VALUES ( 937, 356.855000, 917 )
insert into invoiceTree VALUES ( 938, 353.982000, 918 )
insert into invoiceTree VALUES ( 939, 351.085000, 919 )
insert into invoiceTree VALUES ( 940, 348.166000, 920 )
insert into invoiceTree VALUES ( 941, 345.223000, 921 )
insert into invoiceTree VALUES ( 942, 342.256000, 922 )
insert into invoiceTree VALUES ( 943, 339.264000, 923 )
insert into invoiceTree VALUES ( 944, 336.246000, 924 )
insert into invoiceTree VALUES ( 945, 333.202000, 925 )
insert into invoiceTree VALUES ( 946, 330.131000, 926 )
insert into invoiceTree VALUES ( 947, 327.032000, 927 )
insert into invoiceTree VALUES ( 948, 323.904000, 928 )
insert into invoiceTree VALUES ( 949, 320.748000, 929 )
insert into invoiceTree VALUES ( 950, 317.560000, 930 )
insert into invoiceTree VALUES ( 951, 314.342000, 931 )
insert into invoiceTree VALUES ( 952, 311.092000, 932 )
insert into invoiceTree VALUES ( 953, 307.808000, 933 )
insert into invoiceTree VALUES ( 954, 304.490000, 934 )
insert into invoiceTree VALUES ( 955, 301.137000, 935 )
insert into invoiceTree VALUES ( 956, 297.747000, 936 )
insert into invoiceTree VALUES ( 957, 294.319000, 937 )
insert into invoiceTree VALUES ( 958, 290.852000, 938 )
insert into invoiceTree VALUES ( 959, 287.344000, 939 )
insert into invoiceTree VALUES ( 960, 283.794000, 940 )
insert into invoiceTree VALUES ( 961, 280.201000, 941 )
insert into invoiceTree VALUES ( 962, 276.562000, 942 )
insert into invoiceTree VALUES ( 963, 272.875000, 943 )
insert into invoiceTree VALUES ( 964, 269.140000, 944 )
insert into invoiceTree VALUES ( 965, 265.353000, 945 )
insert into invoiceTree VALUES ( 966, 261.513000, 946 )
insert into invoiceTree VALUES ( 967, 257.616000, 947 )
insert into invoiceTree VALUES ( 968, 253.662000, 948 )
insert into invoiceTree VALUES ( 969, 249.646000, 949 )
insert into invoiceTree VALUES ( 970, 245.566000, 950 )
insert into invoiceTree VALUES ( 971, 241.418000, 951 )
insert into invoiceTree VALUES ( 972, 237.199000, 952 )
insert into invoiceTree VALUES ( 973, 232.905000, 953 )
insert into invoiceTree VALUES ( 974, 228.532000, 954 )
insert into invoiceTree VALUES ( 975, 224.075000, 955 )
insert into invoiceTree VALUES ( 976, 219.530000, 956 )
insert into invoiceTree VALUES ( 977, 214.889000, 957 )
insert into invoiceTree VALUES ( 978, 210.148000, 958 )
insert into invoiceTree VALUES ( 979, 205.299000, 959 )
insert into invoiceTree VALUES ( 980, 200.335000, 960 )
insert into invoiceTree VALUES ( 981, 195.246000, 961 )
insert into invoiceTree VALUES ( 982, 190.022000, 962 )
insert into invoiceTree VALUES ( 983, 184.653000, 963 )
insert into invoiceTree VALUES ( 984, 179.125000, 964 )
insert into invoiceTree VALUES ( 985, 173.422000, 965 )
insert into invoiceTree VALUES ( 986, 167.528000, 966 )
insert into invoiceTree VALUES ( 987, 161.420000, 967 )
insert into invoiceTree VALUES ( 988, 155.075000, 968 )
insert into invoiceTree VALUES ( 989, 148.460000, 969 )
insert into invoiceTree VALUES ( 990, 141.539000, 970 )
insert into invoiceTree VALUES ( 991, 134.265000, 971 )
insert into invoiceTree VALUES ( 992, 126.576000, 972 )
insert into invoiceTree VALUES ( 993, 118.391000, 973 )
insert into invoiceTree VALUES ( 994, 109.599000, 974 )
insert into invoiceTree VALUES ( 995, 100.042000, 975 )
insert into invoiceTree VALUES ( 996, 89.473000, 976 )
insert into invoiceTree VALUES ( 997, 77.479000, 977 )
insert into invoiceTree VALUES ( 998, 63.256000, 978 )
insert into invoiceTree VALUES ( 999, 44.725000, 979 )
insert into invoiceTree VALUES ( 1000, 0, 980 )


insert into invoiceTree VALUES ( 120, 1550.795000, 0 )
insert into invoiceTree VALUES ( 121, 1549.795000, 1 )
insert into invoiceTree VALUES ( 122, 1548.795000, 2 )
insert into invoiceTree VALUES ( 123, 1547.794000, 3 )
insert into invoiceTree VALUES ( 124, 1546.794000, 4 )
insert into invoiceTree VALUES ( 125, 1545.794000, 5 )
insert into invoiceTree VALUES ( 126, 1544.793000, 6 )
insert into invoiceTree VALUES ( 127, 1543.793000, 7 )
insert into invoiceTree VALUES ( 128, 1542.793000, 8 )
insert into invoiceTree VALUES ( 129, 1541.792000, 9 )
insert into invoiceTree VALUES ( 130, 1540.792000, 10 )
insert into invoiceTree VALUES ( 131, 1539.791000, 11 )
insert into invoiceTree VALUES ( 132, 1538.791000, 12 )
insert into invoiceTree VALUES ( 133, 1537.790000, 13 )
insert into invoiceTree VALUES ( 134, 1536.790000, 14 )
insert into invoiceTree VALUES ( 135, 1535.789000, 15 )
insert into invoiceTree VALUES ( 136, 1534.789000, 16 )
insert into invoiceTree VALUES ( 137, 1533.788000, 17 )
insert into invoiceTree VALUES ( 138, 1532.787000, 18 )
insert into invoiceTree VALUES ( 139, 1531.786000, 19 )
insert into invoiceTree VALUES ( 140, 1530.786000, 20 )
insert into invoiceTree VALUES ( 141, 1529.785000, 21 )
insert into invoiceTree VALUES ( 142, 1528.784000, 22 )
insert into invoiceTree VALUES ( 143, 1527.783000, 23 )
insert into invoiceTree VALUES ( 144, 1526.782000, 24 )
insert into invoiceTree VALUES ( 145, 1525.781000, 25 )
insert into invoiceTree VALUES ( 146, 1524.780000, 26 )
insert into invoiceTree VALUES ( 147, 1523.779000, 27 )
insert into invoiceTree VALUES ( 148, 1522.778000, 28 )
insert into invoiceTree VALUES ( 149, 1521.777000, 29 )
insert into invoiceTree VALUES ( 150, 1520.775000, 30 )
insert into invoiceTree VALUES ( 151, 1519.774000, 31 )
insert into invoiceTree VALUES ( 152, 1518.773000, 32 )
insert into invoiceTree VALUES ( 153, 1517.771000, 33 )
insert into invoiceTree VALUES ( 154, 1516.770000, 34 )
insert into invoiceTree VALUES ( 155, 1515.769000, 35 )
insert into invoiceTree VALUES ( 156, 1514.767000, 36 )
insert into invoiceTree VALUES ( 157, 1513.765000, 37 )
insert into invoiceTree VALUES ( 158, 1512.764000, 38 )
insert into invoiceTree VALUES ( 159, 1511.762000, 39 )
insert into invoiceTree VALUES ( 160, 1510.760000, 40 )
insert into invoiceTree VALUES ( 161, 1509.758000, 41 )
insert into invoiceTree VALUES ( 162, 1508.757000, 42 )
insert into invoiceTree VALUES ( 163, 1507.755000, 43 )
insert into invoiceTree VALUES ( 164, 1506.753000, 44 )
insert into invoiceTree VALUES ( 165, 1505.750000, 45 )
insert into invoiceTree VALUES ( 166, 1504.748000, 46 )
insert into invoiceTree VALUES ( 167, 1503.746000, 47 )
insert into invoiceTree VALUES ( 168, 1502.744000, 48 )
insert into invoiceTree VALUES ( 169, 1501.741000, 49 )
insert into invoiceTree VALUES ( 170, 1500.739000, 50 )
insert into invoiceTree VALUES ( 171, 1499.737000, 51 )
insert into invoiceTree VALUES ( 172, 1498.734000, 52 )
insert into invoiceTree VALUES ( 173, 1497.731000, 53 )
insert into invoiceTree VALUES ( 174, 1496.729000, 54 )
insert into invoiceTree VALUES ( 175, 1495.726000, 55 )
insert into invoiceTree VALUES ( 176, 1494.723000, 56 )
insert into invoiceTree VALUES ( 177, 1493.720000, 57 )
insert into invoiceTree VALUES ( 178, 1492.717000, 58 )
insert into invoiceTree VALUES ( 179, 1491.714000, 59 )
insert into invoiceTree VALUES ( 180, 1490.711000, 60 )
insert into invoiceTree VALUES ( 181, 1489.707000, 61 )
insert into invoiceTree VALUES ( 182, 1488.704000, 62 )
insert into invoiceTree VALUES ( 183, 1487.701000, 63 )
insert into invoiceTree VALUES ( 184, 1486.697000, 64 )
insert into invoiceTree VALUES ( 185, 1485.694000, 65 )
insert into invoiceTree VALUES ( 186, 1484.690000, 66 )
insert into invoiceTree VALUES ( 187, 1483.686000, 67 )
insert into invoiceTree VALUES ( 188, 1482.682000, 68 )
insert into invoiceTree VALUES ( 189, 1481.678000, 69 )
insert into invoiceTree VALUES ( 190, 1480.674000, 70 )
insert into invoiceTree VALUES ( 191, 1479.670000, 71 )
insert into invoiceTree VALUES ( 192, 1478.666000, 72 )
insert into invoiceTree VALUES ( 193, 1477.662000, 73 )
insert into invoiceTree VALUES ( 194, 1476.657000, 74 )
insert into invoiceTree VALUES ( 195, 1475.653000, 75 )
insert into invoiceTree VALUES ( 196, 1474.648000, 76 )
insert into invoiceTree VALUES ( 197, 1473.644000, 77 )
insert into invoiceTree VALUES ( 198, 1472.639000, 78 )
insert into invoiceTree VALUES ( 199, 1471.634000, 79 )
insert into invoiceTree VALUES ( 1100, 1470.629000, 80 )
insert into invoiceTree VALUES ( 1101, 1469.624000, 81 )
insert into invoiceTree VALUES ( 1102, 1468.619000, 82 )
insert into invoiceTree VALUES ( 1103, 1467.613000, 83 )
insert into invoiceTree VALUES ( 1104, 1466.608000, 84 )
insert into invoiceTree VALUES ( 1105, 1465.602000, 85 )
insert into invoiceTree VALUES ( 1106, 1464.597000, 86 )
insert into invoiceTree VALUES ( 1107, 1463.591000, 87 )
insert into invoiceTree VALUES ( 1108, 1462.585000, 88 )
insert into invoiceTree VALUES ( 1109, 1461.579000, 89 )
insert into invoiceTree VALUES ( 1110, 1460.573000, 90 )
insert into invoiceTree VALUES ( 1111, 1459.567000, 91 )
insert into invoiceTree VALUES ( 1112, 1458.561000, 92 )
insert into invoiceTree VALUES ( 1113, 1457.554000, 93 )
insert into invoiceTree VALUES ( 1114, 1456.548000, 94 )
insert into invoiceTree VALUES ( 1115, 1455.541000, 95 )
insert into invoiceTree VALUES ( 1116, 1454.535000, 96 )
insert into invoiceTree VALUES ( 1117, 1453.528000, 97 )
insert into invoiceTree VALUES ( 1118, 1452.521000, 98 )
insert into invoiceTree VALUES ( 1119, 1451.514000, 99 )
insert into invoiceTree VALUES ( 1120, 1450.506000, 100 )
insert into invoiceTree VALUES ( 1121, 1449.499000, 101 )
insert into invoiceTree VALUES ( 1122, 1448.492000, 102 )
insert into invoiceTree VALUES ( 1123, 1447.484000, 103 )
insert into invoiceTree VALUES ( 1124, 1446.476000, 104 )
insert into invoiceTree VALUES ( 1125, 1445.468000, 105 )
insert into invoiceTree VALUES ( 1126, 1444.461000, 106 )
insert into invoiceTree VALUES ( 1127, 1443.452000, 107 )
insert into invoiceTree VALUES ( 1128, 1442.444000, 108 )
insert into invoiceTree VALUES ( 1129, 1441.436000, 109 )
insert into invoiceTree VALUES ( 1130, 1440.427000, 110 )
insert into invoiceTree VALUES ( 1131, 1439.419000, 111 )
insert into invoiceTree VALUES ( 1132, 1438.410000, 112 )
insert into invoiceTree VALUES ( 1133, 1437.401000, 113 )
insert into invoiceTree VALUES ( 1134, 1436.392000, 114 )
insert into invoiceTree VALUES ( 1135, 1435.383000, 115 )
insert into invoiceTree VALUES ( 1136, 1434.374000, 116 )
insert into invoiceTree VALUES ( 1137, 1433.364000, 117 )
insert into invoiceTree VALUES ( 1138, 1432.355000, 118 )
insert into invoiceTree VALUES ( 1139, 1431.345000, 119 )
insert into invoiceTree VALUES ( 1140, 1430.335000, 120 )
insert into invoiceTree VALUES ( 1141, 1429.325000, 121 )
insert into invoiceTree VALUES ( 1142, 1428.315000, 122 )
insert into invoiceTree VALUES ( 1143, 1427.304000, 123 )
insert into invoiceTree VALUES ( 1144, 1426.294000, 124 )
insert into invoiceTree VALUES ( 1145, 1425.283000, 125 )
insert into invoiceTree VALUES ( 1146, 1424.273000, 126 )
insert into invoiceTree VALUES ( 1147, 1423.262000, 127 )
insert into invoiceTree VALUES ( 1148, 1422.251000, 128 )
insert into invoiceTree VALUES ( 1149, 1421.239000, 129 )
insert into invoiceTree VALUES ( 1150, 1420.228000, 130 )
insert into invoiceTree VALUES ( 1151, 1419.217000, 131 )
insert into invoiceTree VALUES ( 1152, 1418.205000, 132 )
insert into invoiceTree VALUES ( 1153, 1417.193000, 133 )
insert into invoiceTree VALUES ( 1154, 1416.181000, 134 )
insert into invoiceTree VALUES ( 1155, 1415.169000, 135 )
insert into invoiceTree VALUES ( 1156, 1414.157000, 136 )
insert into invoiceTree VALUES ( 1157, 1413.144000, 137 )
insert into invoiceTree VALUES ( 1158, 1412.131000, 138 )
insert into invoiceTree VALUES ( 1159, 1411.119000, 139 )
insert into invoiceTree VALUES ( 1160, 1410.106000, 140 )
insert into invoiceTree VALUES ( 1161, 1409.093000, 141 )
insert into invoiceTree VALUES ( 1162, 1408.079000, 142 )
insert into invoiceTree VALUES ( 1163, 1407.066000, 143 )
insert into invoiceTree VALUES ( 1164, 1406.052000, 144 )
insert into invoiceTree VALUES ( 1165, 1405.038000, 145 )
insert into invoiceTree VALUES ( 1166, 1404.024000, 146 )
insert into invoiceTree VALUES ( 1167, 1403.010000, 147 )
insert into invoiceTree VALUES ( 1168, 1401.996000, 148 )
insert into invoiceTree VALUES ( 1169, 1400.981000, 149 )
insert into invoiceTree VALUES ( 1170, 1399.967000, 150 )
insert into invoiceTree VALUES ( 1171, 1398.952000, 151 )
insert into invoiceTree VALUES ( 1172, 1397.937000, 152 )
insert into invoiceTree VALUES ( 1173, 1396.922000, 153 )
insert into invoiceTree VALUES ( 1174, 1395.906000, 154 )
insert into invoiceTree VALUES ( 1175, 1394.891000, 155 )
insert into invoiceTree VALUES ( 1176, 1393.875000, 156 )
insert into invoiceTree VALUES ( 1177, 1392.859000, 157 )
insert into invoiceTree VALUES ( 1178, 1391.843000, 158 )
insert into invoiceTree VALUES ( 1179, 1390.826000, 159 )
insert into invoiceTree VALUES ( 1180, 1389.810000, 160 )
insert into invoiceTree VALUES ( 1181, 1388.793000, 161 )
insert into invoiceTree VALUES ( 1182, 1387.776000, 162 )
insert into invoiceTree VALUES ( 1183, 1386.759000, 163 )
insert into invoiceTree VALUES ( 1184, 1385.742000, 164 )
insert into invoiceTree VALUES ( 1185, 1384.724000, 165 )
insert into invoiceTree VALUES ( 1186, 1383.707000, 166 )
insert into invoiceTree VALUES ( 1187, 1382.689000, 167 )
insert into invoiceTree VALUES ( 1188, 1381.671000, 168 )
insert into invoiceTree VALUES ( 1189, 1380.653000, 169 )
insert into invoiceTree VALUES ( 1190, 1379.634000, 170 )
insert into invoiceTree VALUES ( 1191, 1378.616000, 171 )
insert into invoiceTree VALUES ( 1192, 1377.597000, 172 )
insert into invoiceTree VALUES ( 1193, 1376.578000, 173 )
insert into invoiceTree VALUES ( 1194, 1375.558000, 174 )
insert into invoiceTree VALUES ( 1195, 1374.539000, 175 )
insert into invoiceTree VALUES ( 1196, 1373.519000, 176 )
insert into invoiceTree VALUES ( 1197, 1372.499000, 177 )
insert into invoiceTree VALUES ( 1198, 1371.479000, 178 )
insert into invoiceTree VALUES ( 1199, 1370.459000, 179 )
insert into invoiceTree VALUES ( 1200, 1369.438000, 180 )
insert into invoiceTree VALUES ( 1201, 1368.418000, 181 )
insert into invoiceTree VALUES ( 1202, 1367.397000, 182 )
insert into invoiceTree VALUES ( 1203, 1366.376000, 183 )
insert into invoiceTree VALUES ( 1204, 1365.354000, 184 )
insert into invoiceTree VALUES ( 1205, 1364.333000, 185 )
insert into invoiceTree VALUES ( 1206, 1363.311000, 186 )
insert into invoiceTree VALUES ( 1207, 1362.289000, 187 )
insert into invoiceTree VALUES ( 1208, 1361.267000, 188 )
insert into invoiceTree VALUES ( 1209, 1360.244000, 189 )
insert into invoiceTree VALUES ( 1210, 1359.221000, 190 )
insert into invoiceTree VALUES ( 1211, 1358.198000, 191 )
insert into invoiceTree VALUES ( 1212, 1357.175000, 192 )
insert into invoiceTree VALUES ( 1213, 1356.152000, 193 )
insert into invoiceTree VALUES ( 1214, 1355.128000, 194 )
insert into invoiceTree VALUES ( 1215, 1354.104000, 195 )
insert into invoiceTree VALUES ( 1216, 1353.080000, 196 )
insert into invoiceTree VALUES ( 1217, 1352.056000, 197 )
insert into invoiceTree VALUES ( 1218, 1351.032000, 198 )
insert into invoiceTree VALUES ( 1219, 1350.007000, 199 )
insert into invoiceTree VALUES ( 1220, 1348.982000, 200 )
insert into invoiceTree VALUES ( 1221, 1347.957000, 201 )
insert into invoiceTree VALUES ( 1222, 1346.931000, 202 )
insert into invoiceTree VALUES ( 1223, 1345.905000, 203 )
insert into invoiceTree VALUES ( 1224, 1344.879000, 204 )
insert into invoiceTree VALUES ( 1225, 1343.853000, 205 )
insert into invoiceTree VALUES ( 1226, 1342.827000, 206 )
insert into invoiceTree VALUES ( 1227, 1341.800000, 207 )
insert into invoiceTree VALUES ( 1228, 1340.773000, 208 )
insert into invoiceTree VALUES ( 1229, 1339.746000, 209 )
insert into invoiceTree VALUES ( 1230, 1338.719000, 210 )
insert into invoiceTree VALUES ( 1231, 1337.691000, 211 )
insert into invoiceTree VALUES ( 1232, 1336.663000, 212 )
insert into invoiceTree VALUES ( 1233, 1335.635000, 213 )
insert into invoiceTree VALUES ( 1234, 1334.606000, 214 )
insert into invoiceTree VALUES ( 1235, 1333.578000, 215 )
insert into invoiceTree VALUES ( 1236, 1332.549000, 216 )
insert into invoiceTree VALUES ( 1237, 1331.520000, 217 )
insert into invoiceTree VALUES ( 1238, 1330.490000, 218 )
insert into invoiceTree VALUES ( 1239, 1329.460000, 219 )
insert into invoiceTree VALUES ( 1240, 1328.430000, 220 )
insert into invoiceTree VALUES ( 1241, 1327.400000, 221 )
insert into invoiceTree VALUES ( 1242, 1326.370000, 222 )
insert into invoiceTree VALUES ( 1243, 1325.339000, 223 )
insert into invoiceTree VALUES ( 1244, 1324.308000, 224 )
insert into invoiceTree VALUES ( 1245, 1323.277000, 225 )
insert into invoiceTree VALUES ( 1246, 1322.245000, 226 )
insert into invoiceTree VALUES ( 1247, 1321.213000, 227 )
insert into invoiceTree VALUES ( 1248, 1320.181000, 228 )
insert into invoiceTree VALUES ( 1249, 1319.149000, 229 )
insert into invoiceTree VALUES ( 1250, 1318.116000, 230 )
insert into invoiceTree VALUES ( 1251, 1317.083000, 231 )
insert into invoiceTree VALUES ( 1252, 1316.050000, 232 )
insert into invoiceTree VALUES ( 1253, 1315.016000, 233 )
insert into invoiceTree VALUES ( 1254, 1313.983000, 234 )
insert into invoiceTree VALUES ( 1255, 1312.949000, 235 )
insert into invoiceTree VALUES ( 1256, 1311.914000, 236 )
insert into invoiceTree VALUES ( 1257, 1310.880000, 237 )
insert into invoiceTree VALUES ( 1258, 1309.845000, 238 )
insert into invoiceTree VALUES ( 1259, 1308.810000, 239 )
insert into invoiceTree VALUES ( 1260, 1307.774000, 240 )
insert into invoiceTree VALUES ( 1261, 1306.738000, 241 )
insert into invoiceTree VALUES ( 1262, 1305.702000, 242 )
insert into invoiceTree VALUES ( 1263, 1304.666000, 243 )
insert into invoiceTree VALUES ( 1264, 1303.629000, 244 )
insert into invoiceTree VALUES ( 1265, 1302.592000, 245 )
insert into invoiceTree VALUES ( 1266, 1301.555000, 246 )
insert into invoiceTree VALUES ( 1267, 1300.518000, 247 )
insert into invoiceTree VALUES ( 1268, 1299.480000, 248 )
insert into invoiceTree VALUES ( 1269, 1298.442000, 249 )
insert into invoiceTree VALUES ( 1270, 1297.403000, 250 )
insert into invoiceTree VALUES ( 1271, 1296.365000, 251 )
insert into invoiceTree VALUES ( 1272, 1295.326000, 252 )
insert into invoiceTree VALUES ( 1273, 1294.286000, 253 )
insert into invoiceTree VALUES ( 1274, 1293.247000, 254 )
insert into invoiceTree VALUES ( 1275, 1292.207000, 255 )
insert into invoiceTree VALUES ( 1276, 1291.166000, 256 )
insert into invoiceTree VALUES ( 1277, 1290.126000, 257 )
insert into invoiceTree VALUES ( 1278, 1289.085000, 258 )
insert into invoiceTree VALUES ( 1279, 1288.044000, 259 )
insert into invoiceTree VALUES ( 1280, 1287.002000, 260 )
insert into invoiceTree VALUES ( 1281, 1285.960000, 261 )
insert into invoiceTree VALUES ( 1282, 1284.918000, 262 )
insert into invoiceTree VALUES ( 1283, 1283.876000, 263 )
insert into invoiceTree VALUES ( 1284, 1282.833000, 264 )
insert into invoiceTree VALUES ( 1285, 1281.790000, 265 )
insert into invoiceTree VALUES ( 1286, 1280.746000, 266 )
insert into invoiceTree VALUES ( 1287, 1279.703000, 267 )
insert into invoiceTree VALUES ( 1288, 1278.659000, 268 )
insert into invoiceTree VALUES ( 1289, 1277.614000, 269 )
insert into invoiceTree VALUES ( 1290, 1276.569000, 270 )
insert into invoiceTree VALUES ( 1291, 1275.524000, 271 )
insert into invoiceTree VALUES ( 1292, 1274.479000, 272 )
insert into invoiceTree VALUES ( 1293, 1273.433000, 273 )
insert into invoiceTree VALUES ( 1294, 1272.387000, 274 )
insert into invoiceTree VALUES ( 1295, 1271.341000, 275 )
insert into invoiceTree VALUES ( 1296, 1270.294000, 276 )
insert into invoiceTree VALUES ( 1297, 1269.247000, 277 )
insert into invoiceTree VALUES ( 1298, 1268.200000, 278 )
insert into invoiceTree VALUES ( 1299, 1267.152000, 279 )
insert into invoiceTree VALUES ( 1300, 1266.104000, 280 )
insert into invoiceTree VALUES ( 1301, 1265.055000, 281 )
insert into invoiceTree VALUES ( 1302, 1264.006000, 282 )
insert into invoiceTree VALUES ( 1303, 1262.957000, 283 )
insert into invoiceTree VALUES ( 1304, 1261.908000, 284 )
insert into invoiceTree VALUES ( 1305, 1260.858000, 285 )
insert into invoiceTree VALUES ( 1306, 1259.808000, 286 )
insert into invoiceTree VALUES ( 1307, 1258.757000, 287 )
insert into invoiceTree VALUES ( 1308, 1257.706000, 288 )
insert into invoiceTree VALUES ( 1309, 1256.655000, 289 )
insert into invoiceTree VALUES ( 1310, 1255.603000, 290 )
insert into invoiceTree VALUES ( 1311, 1254.551000, 291 )
insert into invoiceTree VALUES ( 1312, 1253.499000, 292 )
insert into invoiceTree VALUES ( 1313, 1252.446000, 293 )
insert into invoiceTree VALUES ( 1314, 1251.393000, 294 )
insert into invoiceTree VALUES ( 1315, 1250.340000, 295 )
insert into invoiceTree VALUES ( 1316, 1249.286000, 296 )
insert into invoiceTree VALUES ( 1317, 1248.232000, 297 )
insert into invoiceTree VALUES ( 1318, 1247.177000, 298 )
insert into invoiceTree VALUES ( 1319, 1246.122000, 299 )
insert into invoiceTree VALUES ( 1320, 1245.067000, 300 )
insert into invoiceTree VALUES ( 1321, 1244.011000, 301 )
insert into invoiceTree VALUES ( 1322, 1242.955000, 302 )
insert into invoiceTree VALUES ( 1323, 1241.899000, 303 )
insert into invoiceTree VALUES ( 1324, 1240.842000, 304 )
insert into invoiceTree VALUES ( 1325, 1239.785000, 305 )
insert into invoiceTree VALUES ( 1326, 1238.727000, 306 )
insert into invoiceTree VALUES ( 1327, 1237.669000, 307 )
insert into invoiceTree VALUES ( 1328, 1236.611000, 308 )
insert into invoiceTree VALUES ( 1329, 1235.552000, 309 )
insert into invoiceTree VALUES ( 1330, 1234.493000, 310 )
insert into invoiceTree VALUES ( 1331, 1233.433000, 311 )
insert into invoiceTree VALUES ( 1332, 1232.373000, 312 )
insert into invoiceTree VALUES ( 1333, 1231.313000, 313 )
insert into invoiceTree VALUES ( 1334, 1230.252000, 314 )
insert into invoiceTree VALUES ( 1335, 1229.191000, 315 )
insert into invoiceTree VALUES ( 1336, 1228.130000, 316 )
insert into invoiceTree VALUES ( 1337, 1227.068000, 317 )
insert into invoiceTree VALUES ( 1338, 1226.005000, 318 )
insert into invoiceTree VALUES ( 1339, 1224.943000, 319 )
insert into invoiceTree VALUES ( 1340, 1223.879000, 320 )
insert into invoiceTree VALUES ( 1341, 1222.816000, 321 )
insert into invoiceTree VALUES ( 1342, 1221.752000, 322 )
insert into invoiceTree VALUES ( 1343, 1220.688000, 323 )
insert into invoiceTree VALUES ( 1344, 1219.623000, 324 )
insert into invoiceTree VALUES ( 1345, 1218.558000, 325 )
insert into invoiceTree VALUES ( 1346, 1217.492000, 326 )
insert into invoiceTree VALUES ( 1347, 1216.426000, 327 )
insert into invoiceTree VALUES ( 1348, 1215.359000, 328 )
insert into invoiceTree VALUES ( 1349, 1214.293000, 329 )
insert into invoiceTree VALUES ( 1350, 1213.225000, 330 )
insert into invoiceTree VALUES ( 1351, 1212.157000, 331 )
insert into invoiceTree VALUES ( 1352, 1211.089000, 332 )
insert into invoiceTree VALUES ( 1353, 1210.021000, 333 )
insert into invoiceTree VALUES ( 1354, 1208.952000, 334 )
insert into invoiceTree VALUES ( 1355, 1207.882000, 335 )
insert into invoiceTree VALUES ( 1356, 1206.812000, 336 )
insert into invoiceTree VALUES ( 1357, 1205.742000, 337 )
insert into invoiceTree VALUES ( 1358, 1204.671000, 338 )
insert into invoiceTree VALUES ( 1359, 1203.600000, 339 )
insert into invoiceTree VALUES ( 1360, 1202.528000, 340 )
insert into invoiceTree VALUES ( 1361, 1201.456000, 341 )
insert into invoiceTree VALUES ( 1362, 1200.384000, 342 )
insert into invoiceTree VALUES ( 1363, 1199.311000, 343 )
insert into invoiceTree VALUES ( 1364, 1198.237000, 344 )
insert into invoiceTree VALUES ( 1365, 1197.164000, 345 )
insert into invoiceTree VALUES ( 1366, 1196.089000, 346 )
insert into invoiceTree VALUES ( 1367, 1195.014000, 347 )
insert into invoiceTree VALUES ( 1368, 1193.939000, 348 )
insert into invoiceTree VALUES ( 1369, 1192.863000, 349 )
insert into invoiceTree VALUES ( 1370, 1191.787000, 350 )
insert into invoiceTree VALUES ( 1371, 1190.711000, 351 )
insert into invoiceTree VALUES ( 1372, 1189.634000, 352 )
insert into invoiceTree VALUES ( 1373, 1188.556000, 353 )
insert into invoiceTree VALUES ( 1374, 1187.478000, 354 )
insert into invoiceTree VALUES ( 1375, 1186.400000, 355 )
insert into invoiceTree VALUES ( 1376, 1185.321000, 356 )
insert into invoiceTree VALUES ( 1377, 1184.241000, 357 )
insert into invoiceTree VALUES ( 1378, 1183.161000, 358 )
insert into invoiceTree VALUES ( 1379, 1182.081000, 359 )
insert into invoiceTree VALUES ( 1380, 1181.000000, 360 )
insert into invoiceTree VALUES ( 1381, 1179.919000, 361 )
insert into invoiceTree VALUES ( 1382, 1178.837000, 362 )
insert into invoiceTree VALUES ( 1383, 1177.755000, 363 )
insert into invoiceTree VALUES ( 1384, 1176.672000, 364 )
insert into invoiceTree VALUES ( 1385, 1175.589000, 365 )
insert into invoiceTree VALUES ( 1386, 1174.505000, 366 )
insert into invoiceTree VALUES ( 1387, 1173.420000, 367 )
insert into invoiceTree VALUES ( 1388, 1172.336000, 368 )
insert into invoiceTree VALUES ( 1389, 1171.250000, 369 )
insert into invoiceTree VALUES ( 1390, 1170.165000, 370 )
insert into invoiceTree VALUES ( 1391, 1169.078000, 371 )
insert into invoiceTree VALUES ( 1392, 1167.992000, 372 )
insert into invoiceTree VALUES ( 1393, 1166.904000, 373 )
insert into invoiceTree VALUES ( 1394, 1165.817000, 374 )
insert into invoiceTree VALUES ( 1395, 1164.728000, 375 )
insert into invoiceTree VALUES ( 1396, 1163.640000, 376 )
insert into invoiceTree VALUES ( 1397, 1162.550000, 377 )
insert into invoiceTree VALUES ( 1398, 1161.461000, 378 )
insert into invoiceTree VALUES ( 1399, 1160.370000, 379 )
insert into invoiceTree VALUES ( 1400, 1159.279000, 380 )
insert into invoiceTree VALUES ( 1401, 1158.188000, 381 )
insert into invoiceTree VALUES ( 1402, 1157.096000, 382 )
insert into invoiceTree VALUES ( 1403, 1156.004000, 383 )
insert into invoiceTree VALUES ( 1404, 1154.911000, 384 )
insert into invoiceTree VALUES ( 1405, 1153.817000, 385 )
insert into invoiceTree VALUES ( 1406, 1152.724000, 386 )
insert into invoiceTree VALUES ( 1407, 1151.629000, 387 )
insert into invoiceTree VALUES ( 1408, 1150.534000, 388 )
insert into invoiceTree VALUES ( 1409, 1149.438000, 389 )
insert into invoiceTree VALUES ( 1410, 1148.342000, 390 )
insert into invoiceTree VALUES ( 1411, 1147.246000, 391 )
insert into invoiceTree VALUES ( 1412, 1146.148000, 392 )
insert into invoiceTree VALUES ( 1413, 1145.051000, 393 )
insert into invoiceTree VALUES ( 1414, 1143.952000, 394 )
insert into invoiceTree VALUES ( 1415, 1142.854000, 395 )
insert into invoiceTree VALUES ( 1416, 1141.754000, 396 )
insert into invoiceTree VALUES ( 1417, 1140.654000, 397 )
insert into invoiceTree VALUES ( 1418, 1139.554000, 398 )
insert into invoiceTree VALUES ( 1419, 1138.453000, 399 )
insert into invoiceTree VALUES ( 1420, 1137.351000, 400 )
insert into invoiceTree VALUES ( 1421, 1136.249000, 401 )
insert into invoiceTree VALUES ( 1422, 1135.146000, 402 )
insert into invoiceTree VALUES ( 1423, 1134.043000, 403 )
insert into invoiceTree VALUES ( 1424, 1132.939000, 404 )
insert into invoiceTree VALUES ( 1425, 1131.834000, 405 )
insert into invoiceTree VALUES ( 1426, 1130.729000, 406 )
insert into invoiceTree VALUES ( 1427, 1129.624000, 407 )
insert into invoiceTree VALUES ( 1428, 1128.518000, 408 )
insert into invoiceTree VALUES ( 1429, 1127.411000, 409 )
insert into invoiceTree VALUES ( 1430, 1126.304000, 410 )
insert into invoiceTree VALUES ( 1431, 1125.196000, 411 )
insert into invoiceTree VALUES ( 1432, 1124.087000, 412 )
insert into invoiceTree VALUES ( 1433, 1122.978000, 413 )
insert into invoiceTree VALUES ( 1434, 1121.868000, 414 )
insert into invoiceTree VALUES ( 1435, 1120.758000, 415 )
insert into invoiceTree VALUES ( 1436, 1119.647000, 416 )
insert into invoiceTree VALUES ( 1437, 1118.536000, 417 )
insert into invoiceTree VALUES ( 1438, 1117.424000, 418 )
insert into invoiceTree VALUES ( 1439, 1116.311000, 419 )
insert into invoiceTree VALUES ( 1440, 1115.198000, 420 )
insert into invoiceTree VALUES ( 1441, 1114.084000, 421 )
insert into invoiceTree VALUES ( 1442, 1112.969000, 422 )
insert into invoiceTree VALUES ( 1443, 1111.854000, 423 )
insert into invoiceTree VALUES ( 1444, 1110.738000, 424 )
insert into invoiceTree VALUES ( 1445, 1109.622000, 425 )
insert into invoiceTree VALUES ( 1446, 1108.505000, 426 )
insert into invoiceTree VALUES ( 1447, 1107.388000, 427 )
insert into invoiceTree VALUES ( 1448, 1106.269000, 428 )
insert into invoiceTree VALUES ( 1449, 1105.150000, 429 )
insert into invoiceTree VALUES ( 1450, 1104.031000, 430 )
insert into invoiceTree VALUES ( 1451, 1102.911000, 431 )
insert into invoiceTree VALUES ( 1452, 1101.790000, 432 )
insert into invoiceTree VALUES ( 1453, 1100.669000, 433 )
insert into invoiceTree VALUES ( 1454, 1099.547000, 434 )
insert into invoiceTree VALUES ( 1455, 1098.424000, 435 )
insert into invoiceTree VALUES ( 1456, 1097.301000, 436 )
insert into invoiceTree VALUES ( 1457, 1096.177000, 437 )
insert into invoiceTree VALUES ( 1458, 1095.052000, 438 )
insert into invoiceTree VALUES ( 1459, 1093.927000, 439 )
insert into invoiceTree VALUES ( 1460, 1092.801000, 440 )
insert into invoiceTree VALUES ( 1461, 1091.675000, 441 )
insert into invoiceTree VALUES ( 1462, 1090.547000, 442 )
insert into invoiceTree VALUES ( 1463, 1089.419000, 443 )
insert into invoiceTree VALUES ( 1464, 1088.291000, 444 )
insert into invoiceTree VALUES ( 1465, 1087.162000, 445 )
insert into invoiceTree VALUES ( 1466, 1086.032000, 446 )
insert into invoiceTree VALUES ( 1467, 1084.901000, 447 )
insert into invoiceTree VALUES ( 1468, 1083.770000, 448 )
insert into invoiceTree VALUES ( 1469, 1082.638000, 449 )
insert into invoiceTree VALUES ( 1470, 1081.506000, 450 )
insert into invoiceTree VALUES ( 1471, 1080.372000, 451 )
insert into invoiceTree VALUES ( 1472, 1079.238000, 452 )
insert into invoiceTree VALUES ( 1473, 1078.104000, 453 )
insert into invoiceTree VALUES ( 1474, 1076.968000, 454 )
insert into invoiceTree VALUES ( 1475, 1075.832000, 455 )
insert into invoiceTree VALUES ( 1476, 1074.696000, 456 )
insert into invoiceTree VALUES ( 1477, 1073.558000, 457 )
insert into invoiceTree VALUES ( 1478, 1072.420000, 458 )
insert into invoiceTree VALUES ( 1479, 1071.281000, 459 )
insert into invoiceTree VALUES ( 1480, 1070.142000, 460 )
insert into invoiceTree VALUES ( 1481, 1069.001000, 461 )
insert into invoiceTree VALUES ( 1482, 1067.860000, 462 )
insert into invoiceTree VALUES ( 1483, 1066.719000, 463 )
insert into invoiceTree VALUES ( 1484, 1065.576000, 464 )
insert into invoiceTree VALUES ( 1485, 1064.433000, 465 )
insert into invoiceTree VALUES ( 1486, 1063.289000, 466 )
insert into invoiceTree VALUES ( 1487, 1062.145000, 467 )
insert into invoiceTree VALUES ( 1488, 1060.999000, 468 )
insert into invoiceTree VALUES ( 1489, 1059.853000, 469 )
insert into invoiceTree VALUES ( 1490, 1058.707000, 470 )
insert into invoiceTree VALUES ( 1491, 1057.559000, 471 )
insert into invoiceTree VALUES ( 1492, 1056.411000, 472 )
insert into invoiceTree VALUES ( 1493, 1055.262000, 473 )
insert into invoiceTree VALUES ( 1494, 1054.112000, 474 )
insert into invoiceTree VALUES ( 1495, 1052.961000, 475 )
insert into invoiceTree VALUES ( 1496, 1051.810000, 476 )
insert into invoiceTree VALUES ( 1497, 1050.658000, 477 )
insert into invoiceTree VALUES ( 1498, 1049.505000, 478 )
insert into invoiceTree VALUES ( 1499, 1048.352000, 479 )
insert into invoiceTree VALUES ( 1500, 1047.198000, 480 )
insert into invoiceTree VALUES ( 1501, 1046.042000, 481 )
insert into invoiceTree VALUES ( 1502, 1044.887000, 482 )
insert into invoiceTree VALUES ( 1503, 1043.730000, 483 )
insert into invoiceTree VALUES ( 1504, 1042.573000, 484 )
insert into invoiceTree VALUES ( 1505, 1041.414000, 485 )
insert into invoiceTree VALUES ( 1506, 1040.255000, 486 )
insert into invoiceTree VALUES ( 1507, 1039.096000, 487 )
insert into invoiceTree VALUES ( 1508, 1037.935000, 488 )
insert into invoiceTree VALUES ( 1509, 1036.774000, 489 )
insert into invoiceTree VALUES ( 1510, 1035.612000, 490 )
insert into invoiceTree VALUES ( 1511, 1034.449000, 491 )
insert into invoiceTree VALUES ( 1512, 1033.285000, 492 )
insert into invoiceTree VALUES ( 1513, 1032.120000, 493 )
insert into invoiceTree VALUES ( 1514, 1030.955000, 494 )
insert into invoiceTree VALUES ( 1515, 1029.789000, 495 )
insert into invoiceTree VALUES ( 1516, 1028.622000, 496 )
insert into invoiceTree VALUES ( 1517, 1027.454000, 497 )
insert into invoiceTree VALUES ( 1518, 1026.285000, 498 )
insert into invoiceTree VALUES ( 1519, 1025.116000, 499 )
insert into invoiceTree VALUES ( 1520, 1023.945000, 500 )
insert into invoiceTree VALUES ( 1521, 1022.774000, 501 )
insert into invoiceTree VALUES ( 1522, 1021.602000, 502 )
insert into invoiceTree VALUES ( 1523, 1020.429000, 503 )
insert into invoiceTree VALUES ( 1524, 1019.256000, 504 )
insert into invoiceTree VALUES ( 1525, 1018.081000, 505 )
insert into invoiceTree VALUES ( 1526, 1016.906000, 506 )
insert into invoiceTree VALUES ( 1527, 1015.730000, 507 )
insert into invoiceTree VALUES ( 1528, 1014.553000, 508 )
insert into invoiceTree VALUES ( 1529, 1013.375000, 509 )
insert into invoiceTree VALUES ( 1530, 1012.196000, 510 )
insert into invoiceTree VALUES ( 1531, 1011.016000, 511 )
insert into invoiceTree VALUES ( 1532, 1009.836000, 512 )
insert into invoiceTree VALUES ( 1533, 1008.654000, 513 )
insert into invoiceTree VALUES ( 1534, 1007.472000, 514 )
insert into invoiceTree VALUES ( 1535, 1006.289000, 515 )
insert into invoiceTree VALUES ( 1536, 1005.104000, 516 )
insert into invoiceTree VALUES ( 1537, 1003.920000, 517 )
insert into invoiceTree VALUES ( 1538, 1002.734000, 518 )
insert into invoiceTree VALUES ( 1539, 1001.547000, 519 )
insert into invoiceTree VALUES ( 1540, 1000.359000, 520 )
insert into invoiceTree VALUES ( 1541, 999.171000, 521 )
insert into invoiceTree VALUES ( 1542, 997.981000, 522 )
insert into invoiceTree VALUES ( 1543, 996.791000, 523 )
insert into invoiceTree VALUES ( 1544, 995.599000, 524 )
insert into invoiceTree VALUES ( 1545, 994.407000, 525 )
insert into invoiceTree VALUES ( 1546, 993.214000, 526 )
insert into invoiceTree VALUES ( 1547, 992.020000, 527 )
insert into invoiceTree VALUES ( 1548, 990.825000, 528 )
insert into invoiceTree VALUES ( 1549, 989.629000, 529 )
insert into invoiceTree VALUES ( 1550, 988.432000, 530 )
insert into invoiceTree VALUES ( 1551, 987.234000, 531 )
insert into invoiceTree VALUES ( 1552, 986.035000, 532 )
insert into invoiceTree VALUES ( 1553, 984.836000, 533 )
insert into invoiceTree VALUES ( 1554, 983.635000, 534 )
insert into invoiceTree VALUES ( 1555, 982.433000, 535 )
insert into invoiceTree VALUES ( 1556, 981.231000, 536 )
insert into invoiceTree VALUES ( 1557, 980.027000, 537 )
insert into invoiceTree VALUES ( 1558, 978.823000, 538 )
insert into invoiceTree VALUES ( 1559, 977.617000, 539 )
insert into invoiceTree VALUES ( 1560, 976.411000, 540 )
insert into invoiceTree VALUES ( 1561, 975.203000, 541 )
insert into invoiceTree VALUES ( 1562, 973.995000, 542 )
insert into invoiceTree VALUES ( 1563, 972.785000, 543 )
insert into invoiceTree VALUES ( 1564, 971.575000, 544 )
insert into invoiceTree VALUES ( 1565, 970.363000, 545 )
insert into invoiceTree VALUES ( 1566, 969.151000, 546 )
insert into invoiceTree VALUES ( 1567, 967.937000, 547 )
insert into invoiceTree VALUES ( 1568, 966.723000, 548 )
insert into invoiceTree VALUES ( 1569, 965.507000, 549 )
insert into invoiceTree VALUES ( 1570, 964.290000, 550 )
insert into invoiceTree VALUES ( 1571, 963.073000, 551 )
insert into invoiceTree VALUES ( 1572, 961.854000, 552 )
insert into invoiceTree VALUES ( 1573, 960.635000, 553 )
insert into invoiceTree VALUES ( 1574, 959.414000, 554 )
insert into invoiceTree VALUES ( 1575, 958.192000, 555 )
insert into invoiceTree VALUES ( 1576, 956.969000, 556 )
insert into invoiceTree VALUES ( 1577, 955.746000, 557 )
insert into invoiceTree VALUES ( 1578, 954.521000, 558 )
insert into invoiceTree VALUES ( 1579, 953.295000, 559 )
insert into invoiceTree VALUES ( 1580, 952.068000, 560 )
insert into invoiceTree VALUES ( 1581, 950.840000, 561 )
insert into invoiceTree VALUES ( 1582, 949.610000, 562 )
insert into invoiceTree VALUES ( 1583, 948.380000, 563 )
insert into invoiceTree VALUES ( 1584, 947.149000, 564 )
insert into invoiceTree VALUES ( 1585, 945.916000, 565 )
insert into invoiceTree VALUES ( 1586, 944.683000, 566 )
insert into invoiceTree VALUES ( 1587, 943.448000, 567 )
insert into invoiceTree VALUES ( 1588, 942.212000, 568 )
insert into invoiceTree VALUES ( 1589, 940.975000, 569 )
insert into invoiceTree VALUES ( 1590, 939.737000, 570 )
insert into invoiceTree VALUES ( 1591, 938.498000, 571 )
insert into invoiceTree VALUES ( 1592, 937.258000, 572 )
insert into invoiceTree VALUES ( 1593, 936.017000, 573 )
insert into invoiceTree VALUES ( 1594, 934.774000, 574 )
insert into invoiceTree VALUES ( 1595, 933.531000, 575 )
insert into invoiceTree VALUES ( 1596, 932.286000, 576 )
insert into invoiceTree VALUES ( 1597, 931.040000, 577 )
insert into invoiceTree VALUES ( 1598, 929.793000, 578 )
insert into invoiceTree VALUES ( 1599, 928.545000, 579 )
insert into invoiceTree VALUES ( 1600, 927.295000, 580 )
insert into invoiceTree VALUES ( 1601, 926.045000, 581 )
insert into invoiceTree VALUES ( 1602, 924.793000, 582 )
insert into invoiceTree VALUES ( 1603, 923.540000, 583 )
insert into invoiceTree VALUES ( 1604, 922.286000, 584 )
insert into invoiceTree VALUES ( 1605, 921.030000, 585 )
insert into invoiceTree VALUES ( 1606, 919.774000, 586 )
insert into invoiceTree VALUES ( 1607, 918.516000, 587 )
insert into invoiceTree VALUES ( 1608, 917.257000, 588 )
insert into invoiceTree VALUES ( 1609, 915.997000, 589 )
insert into invoiceTree VALUES ( 1610, 914.736000, 590 )
insert into invoiceTree VALUES ( 1611, 913.473000, 591 )
insert into invoiceTree VALUES ( 1612, 912.209000, 592 )
insert into invoiceTree VALUES ( 1613, 910.944000, 593 )
insert into invoiceTree VALUES ( 1614, 909.678000, 594 )
insert into invoiceTree VALUES ( 1615, 908.410000, 595 )
insert into invoiceTree VALUES ( 1616, 907.142000, 596 )
insert into invoiceTree VALUES ( 1617, 905.871000, 597 )
insert into invoiceTree VALUES ( 1618, 904.600000, 598 )
insert into invoiceTree VALUES ( 1619, 903.328000, 599 )
insert into invoiceTree VALUES ( 1620, 902.054000, 600 )
insert into invoiceTree VALUES ( 1621, 900.778000, 601 )
insert into invoiceTree VALUES ( 1622, 899.502000, 602 )
insert into invoiceTree VALUES ( 1623, 898.224000, 603 )
insert into invoiceTree VALUES ( 1624, 896.945000, 604 )
insert into invoiceTree VALUES ( 1625, 895.665000, 605 )
insert into invoiceTree VALUES ( 1626, 894.383000, 606 )
insert into invoiceTree VALUES ( 1627, 893.100000, 607 )
insert into invoiceTree VALUES ( 1628, 891.816000, 608 )
insert into invoiceTree VALUES ( 1629, 890.530000, 609 )
insert into invoiceTree VALUES ( 1630, 889.243000, 610 )
insert into invoiceTree VALUES ( 1631, 887.955000, 611 )
insert into invoiceTree VALUES ( 1632, 886.665000, 612 )
insert into invoiceTree VALUES ( 1633, 885.374000, 613 )
insert into invoiceTree VALUES ( 1634, 884.082000, 614 )
insert into invoiceTree VALUES ( 1635, 882.788000, 615 )
insert into invoiceTree VALUES ( 1636, 881.493000, 616 )
insert into invoiceTree VALUES ( 1637, 880.196000, 617 )
insert into invoiceTree VALUES ( 1638, 878.898000, 618 )
insert into invoiceTree VALUES ( 1639, 877.599000, 619 )
insert into invoiceTree VALUES ( 1640, 876.298000, 620 )
insert into invoiceTree VALUES ( 1641, 874.996000, 621 )
insert into invoiceTree VALUES ( 1642, 873.692000, 622 )
insert into invoiceTree VALUES ( 1643, 872.387000, 623 )
insert into invoiceTree VALUES ( 1644, 871.081000, 624 )
insert into invoiceTree VALUES ( 1645, 869.773000, 625 )
insert into invoiceTree VALUES ( 1646, 868.464000, 626 )
insert into invoiceTree VALUES ( 1647, 867.153000, 627 )
insert into invoiceTree VALUES ( 1648, 865.841000, 628 )
insert into invoiceTree VALUES ( 1649, 864.527000, 629 )
insert into invoiceTree VALUES ( 1650, 863.212000, 630 )
insert into invoiceTree VALUES ( 1651, 861.895000, 631 )
insert into invoiceTree VALUES ( 1652, 860.577000, 632 )
insert into invoiceTree VALUES ( 1653, 859.257000, 633 )
insert into invoiceTree VALUES ( 1654, 857.936000, 634 )
insert into invoiceTree VALUES ( 1655, 856.614000, 635 )
insert into invoiceTree VALUES ( 1656, 855.290000, 636 )
insert into invoiceTree VALUES ( 1657, 853.964000, 637 )
insert into invoiceTree VALUES ( 1658, 852.637000, 638 )
insert into invoiceTree VALUES ( 1659, 851.308000, 639 )
insert into invoiceTree VALUES ( 1660, 849.978000, 640 )
insert into invoiceTree VALUES ( 1661, 848.646000, 641 )
insert into invoiceTree VALUES ( 1662, 847.312000, 642 )
insert into invoiceTree VALUES ( 1663, 845.977000, 643 )
insert into invoiceTree VALUES ( 1664, 844.641000, 644 )
insert into invoiceTree VALUES ( 1665, 843.303000, 645 )
insert into invoiceTree VALUES ( 1666, 841.963000, 646 )
insert into invoiceTree VALUES ( 1667, 840.621000, 647 )
insert into invoiceTree VALUES ( 1668, 839.278000, 648 )
insert into invoiceTree VALUES ( 1669, 837.934000, 649 )
insert into invoiceTree VALUES ( 1670, 836.588000, 650 )
insert into invoiceTree VALUES ( 1671, 835.240000, 651 )
insert into invoiceTree VALUES ( 1672, 833.890000, 652 )
insert into invoiceTree VALUES ( 1673, 832.539000, 653 )
insert into invoiceTree VALUES ( 1674, 831.186000, 654 )
insert into invoiceTree VALUES ( 1675, 829.832000, 655 )
insert into invoiceTree VALUES ( 1676, 828.475000, 656 )
insert into invoiceTree VALUES ( 1677, 827.118000, 657 )
insert into invoiceTree VALUES ( 1678, 825.758000, 658 )
insert into invoiceTree VALUES ( 1679, 824.397000, 659 )
insert into invoiceTree VALUES ( 1680, 823.034000, 660 )
insert into invoiceTree VALUES ( 1681, 821.669000, 661 )
insert into invoiceTree VALUES ( 1682, 820.303000, 662 )
insert into invoiceTree VALUES ( 1683, 818.934000, 663 )
insert into invoiceTree VALUES ( 1684, 817.564000, 664 )
insert into invoiceTree VALUES ( 1685, 816.193000, 665 )
insert into invoiceTree VALUES ( 1686, 814.819000, 666 )
insert into invoiceTree VALUES ( 1687, 813.444000, 667 )
insert into invoiceTree VALUES ( 1688, 812.067000, 668 )
insert into invoiceTree VALUES ( 1689, 810.688000, 669 )
insert into invoiceTree VALUES ( 1690, 809.307000, 670 )
insert into invoiceTree VALUES ( 1691, 807.925000, 671 )
insert into invoiceTree VALUES ( 1692, 806.540000, 672 )
insert into invoiceTree VALUES ( 1693, 805.154000, 673 )
insert into invoiceTree VALUES ( 1694, 803.766000, 674 )
insert into invoiceTree VALUES ( 1695, 802.376000, 675 )
insert into invoiceTree VALUES ( 1696, 800.985000, 676 )
insert into invoiceTree VALUES ( 1697, 799.591000, 677 )
insert into invoiceTree VALUES ( 1698, 798.196000, 678 )
insert into invoiceTree VALUES ( 1699, 796.798000, 679 )
insert into invoiceTree VALUES ( 1700, 795.399000, 680 )
insert into invoiceTree VALUES ( 1701, 793.998000, 681 )
insert into invoiceTree VALUES ( 1702, 792.594000, 682 )
insert into invoiceTree VALUES ( 1703, 791.189000, 683 )
insert into invoiceTree VALUES ( 1704, 789.782000, 684 )
insert into invoiceTree VALUES ( 1705, 788.373000, 685 )
insert into invoiceTree VALUES ( 1706, 786.962000, 686 )
insert into invoiceTree VALUES ( 1707, 785.549000, 687 )
insert into invoiceTree VALUES ( 1708, 784.134000, 688 )
insert into invoiceTree VALUES ( 1709, 782.717000, 689 )
insert into invoiceTree VALUES ( 1710, 781.298000, 690 )
insert into invoiceTree VALUES ( 1711, 779.877000, 691 )
insert into invoiceTree VALUES ( 1712, 778.454000, 692 )
insert into invoiceTree VALUES ( 1713, 777.029000, 693 )
insert into invoiceTree VALUES ( 1714, 775.602000, 694 )
insert into invoiceTree VALUES ( 1715, 774.172000, 695 )
insert into invoiceTree VALUES ( 1716, 772.741000, 696 )
insert into invoiceTree VALUES ( 1717, 771.307000, 697 )
insert into invoiceTree VALUES ( 1718, 769.872000, 698 )
insert into invoiceTree VALUES ( 1719, 768.434000, 699 )
insert into invoiceTree VALUES ( 1720, 766.994000, 700 )
insert into invoiceTree VALUES ( 1721, 765.552000, 701 )
insert into invoiceTree VALUES ( 1722, 764.108000, 702 )
insert into invoiceTree VALUES ( 1723, 762.661000, 703 )
insert into invoiceTree VALUES ( 1724, 761.213000, 704 )
insert into invoiceTree VALUES ( 1725, 759.762000, 705 )
insert into invoiceTree VALUES ( 1726, 758.309000, 706 )
insert into invoiceTree VALUES ( 1727, 756.854000, 707 )
insert into invoiceTree VALUES ( 1728, 755.396000, 708 )
insert into invoiceTree VALUES ( 1729, 753.936000, 709 )
insert into invoiceTree VALUES ( 1730, 752.474000, 710 )
insert into invoiceTree VALUES ( 1731, 751.010000, 711 )
insert into invoiceTree VALUES ( 1732, 749.543000, 712 )
insert into invoiceTree VALUES ( 1733, 748.075000, 713 )
insert into invoiceTree VALUES ( 1734, 746.603000, 714 )
insert into invoiceTree VALUES ( 1735, 745.130000, 715 )
insert into invoiceTree VALUES ( 1736, 743.654000, 716 )
insert into invoiceTree VALUES ( 1737, 742.175000, 717 )
insert into invoiceTree VALUES ( 1738, 740.695000, 718 )
insert into invoiceTree VALUES ( 1739, 739.212000, 719 )
insert into invoiceTree VALUES ( 1740, 737.726000, 720 )
insert into invoiceTree VALUES ( 1741, 736.238000, 721 )
insert into invoiceTree VALUES ( 1742, 734.748000, 722 )
insert into invoiceTree VALUES ( 1743, 733.255000, 723 )
insert into invoiceTree VALUES ( 1744, 731.759000, 724 )
insert into invoiceTree VALUES ( 1745, 730.261000, 725 )
insert into invoiceTree VALUES ( 1746, 728.761000, 726 )
insert into invoiceTree VALUES ( 1747, 727.258000, 727 )
insert into invoiceTree VALUES ( 1748, 725.753000, 728 )
insert into invoiceTree VALUES ( 1749, 724.245000, 729 )
insert into invoiceTree VALUES ( 1750, 722.734000, 730 )
insert into invoiceTree VALUES ( 1751, 721.221000, 731 )
insert into invoiceTree VALUES ( 1752, 719.705000, 732 )
insert into invoiceTree VALUES ( 1753, 718.187000, 733 )
insert into invoiceTree VALUES ( 1754, 716.666000, 734 )
insert into invoiceTree VALUES ( 1755, 715.142000, 735 )
insert into invoiceTree VALUES ( 1756, 713.616000, 736 )
insert into invoiceTree VALUES ( 1757, 712.087000, 737 )
insert into invoiceTree VALUES ( 1758, 710.555000, 738 )
insert into invoiceTree VALUES ( 1759, 709.020000, 739 )
insert into invoiceTree VALUES ( 1760, 707.483000, 740 )
insert into invoiceTree VALUES ( 1761, 705.943000, 741 )
insert into invoiceTree VALUES ( 1762, 704.400000, 742 )
insert into invoiceTree VALUES ( 1763, 702.855000, 743 )
insert into invoiceTree VALUES ( 1764, 701.306000, 744 )
insert into invoiceTree VALUES ( 1765, 699.755000, 745 )
insert into invoiceTree VALUES ( 1766, 698.201000, 746 )
insert into invoiceTree VALUES ( 1767, 696.644000, 747 )
insert into invoiceTree VALUES ( 1768, 695.084000, 748 )
insert into invoiceTree VALUES ( 1769, 693.521000, 749 )
insert into invoiceTree VALUES ( 1770, 691.955000, 750 )
insert into invoiceTree VALUES ( 1771, 690.386000, 751 )
insert into invoiceTree VALUES ( 1772, 688.815000, 752 )
insert into invoiceTree VALUES ( 1773, 687.240000, 753 )
insert into invoiceTree VALUES ( 1774, 685.662000, 754 )
insert into invoiceTree VALUES ( 1775, 684.081000, 755 )
insert into invoiceTree VALUES ( 1776, 682.497000, 756 )
insert into invoiceTree VALUES ( 1777, 680.910000, 757 )
insert into invoiceTree VALUES ( 1778, 679.320000, 758 )
insert into invoiceTree VALUES ( 1779, 677.727000, 759 )
insert into invoiceTree VALUES ( 1780, 676.131000, 760 )
insert into invoiceTree VALUES ( 1781, 674.531000, 761 )
insert into invoiceTree VALUES ( 1782, 672.928000, 762 )
insert into invoiceTree VALUES ( 1783, 671.322000, 763 )
insert into invoiceTree VALUES ( 1784, 669.713000, 764 )
insert into invoiceTree VALUES ( 1785, 668.100000, 765 )
insert into invoiceTree VALUES ( 1786, 666.484000, 766 )
insert into invoiceTree VALUES ( 1787, 664.865000, 767 )
insert into invoiceTree VALUES ( 1788, 663.243000, 768 )
insert into invoiceTree VALUES ( 1789, 661.617000, 769 )
insert into invoiceTree VALUES ( 1790, 659.987000, 770 )
insert into invoiceTree VALUES ( 1791, 658.355000, 771 )
insert into invoiceTree VALUES ( 1792, 656.718000, 772 )
insert into invoiceTree VALUES ( 1793, 655.079000, 773 )
insert into invoiceTree VALUES ( 1794, 653.435000, 774 )
insert into invoiceTree VALUES ( 1795, 651.789000, 775 )
insert into invoiceTree VALUES ( 1796, 650.138000, 776 )
insert into invoiceTree VALUES ( 1797, 648.485000, 777 )
insert into invoiceTree VALUES ( 1798, 646.827000, 778 )
insert into invoiceTree VALUES ( 1799, 645.166000, 779 )
insert into invoiceTree VALUES ( 1800, 643.501000, 780 )
insert into invoiceTree VALUES ( 1801, 641.833000, 781 )
insert into invoiceTree VALUES ( 1802, 640.160000, 782 )
insert into invoiceTree VALUES ( 1803, 638.484000, 783 )
insert into invoiceTree VALUES ( 1804, 636.804000, 784 )
insert into invoiceTree VALUES ( 1805, 635.121000, 785 )
insert into invoiceTree VALUES ( 1806, 633.433000, 786 )
insert into invoiceTree VALUES ( 1807, 631.742000, 787 )
insert into invoiceTree VALUES ( 1808, 630.047000, 788 )
insert into invoiceTree VALUES ( 1809, 628.347000, 789 )
insert into invoiceTree VALUES ( 1810, 626.644000, 790 )
insert into invoiceTree VALUES ( 1811, 624.937000, 791 )
insert into invoiceTree VALUES ( 1812, 623.226000, 792 )
insert into invoiceTree VALUES ( 1813, 621.510000, 793 )
insert into invoiceTree VALUES ( 1814, 619.791000, 794 )
insert into invoiceTree VALUES ( 1815, 618.067000, 795 )
insert into invoiceTree VALUES ( 1816, 616.339000, 796 )
insert into invoiceTree VALUES ( 1817, 614.607000, 797 )
insert into invoiceTree VALUES ( 1818, 612.871000, 798 )
insert into invoiceTree VALUES ( 1819, 611.130000, 799 )
insert into invoiceTree VALUES ( 1820, 609.385000, 800 )
insert into invoiceTree VALUES ( 1821, 607.636000, 801 )
insert into invoiceTree VALUES ( 1822, 605.882000, 802 )
insert into invoiceTree VALUES ( 1823, 604.124000, 803 )
insert into invoiceTree VALUES ( 1824, 602.361000, 804 )
insert into invoiceTree VALUES ( 1825, 600.594000, 805 )
insert into invoiceTree VALUES ( 1826, 598.822000, 806 )
insert into invoiceTree VALUES ( 1827, 597.046000, 807 )
insert into invoiceTree VALUES ( 1828, 595.265000, 808 )
insert into invoiceTree VALUES ( 1829, 593.479000, 809 )
insert into invoiceTree VALUES ( 1830, 591.689000, 810 )
insert into invoiceTree VALUES ( 1831, 589.893000, 811 )
insert into invoiceTree VALUES ( 1832, 588.093000, 812 )
insert into invoiceTree VALUES ( 1833, 586.288000, 813 )
insert into invoiceTree VALUES ( 1834, 584.478000, 814 )
insert into invoiceTree VALUES ( 1835, 582.664000, 815 )
insert into invoiceTree VALUES ( 1836, 580.844000, 816 )
insert into invoiceTree VALUES ( 1837, 579.019000, 817 )
insert into invoiceTree VALUES ( 1838, 577.189000, 818 )
insert into invoiceTree VALUES ( 1839, 575.354000, 819 )
insert into invoiceTree VALUES ( 1840, 573.513000, 820 )
insert into invoiceTree VALUES ( 1841, 571.667000, 821 )
insert into invoiceTree VALUES ( 1842, 569.816000, 822 )
insert into invoiceTree VALUES ( 1843, 567.960000, 823 )
insert into invoiceTree VALUES ( 1844, 566.098000, 824 )
insert into invoiceTree VALUES ( 1845, 564.231000, 825 )
insert into invoiceTree VALUES ( 1846, 562.358000, 826 )
insert into invoiceTree VALUES ( 1847, 560.480000, 827 )
insert into invoiceTree VALUES ( 1848, 558.596000, 828 )
insert into invoiceTree VALUES ( 1849, 556.706000, 829 )
insert into invoiceTree VALUES ( 1850, 554.811000, 830 )
insert into invoiceTree VALUES ( 1851, 552.910000, 831 )
insert into invoiceTree VALUES ( 1852, 551.003000, 832 )
insert into invoiceTree VALUES ( 1853, 549.090000, 833 )
insert into invoiceTree VALUES ( 1854, 547.171000, 834 )
insert into invoiceTree VALUES ( 1855, 545.245000, 835 )
insert into invoiceTree VALUES ( 1856, 543.314000, 836 )
insert into invoiceTree VALUES ( 1857, 541.377000, 837 )
insert into invoiceTree VALUES ( 1858, 539.433000, 838 )
insert into invoiceTree VALUES ( 1859, 537.483000, 839 )
insert into invoiceTree VALUES ( 1860, 535.527000, 840 )
insert into invoiceTree VALUES ( 1861, 533.564000, 841 )
insert into invoiceTree VALUES ( 1862, 531.594000, 842 )
insert into invoiceTree VALUES ( 1863, 529.618000, 843 )
insert into invoiceTree VALUES ( 1864, 527.635000, 844 )
insert into invoiceTree VALUES ( 1865, 525.646000, 845 )
insert into invoiceTree VALUES ( 1866, 523.650000, 846 )
insert into invoiceTree VALUES ( 1867, 521.646000, 847 )
insert into invoiceTree VALUES ( 1868, 519.636000, 848 )
insert into invoiceTree VALUES ( 1869, 517.619000, 849 )
insert into invoiceTree VALUES ( 1870, 515.594000, 850 )
insert into invoiceTree VALUES ( 1871, 513.562000, 851 )
insert into invoiceTree VALUES ( 1872, 511.523000, 852 )
insert into invoiceTree VALUES ( 1873, 509.476000, 853 )
insert into invoiceTree VALUES ( 1874, 507.422000, 854 )
insert into invoiceTree VALUES ( 1875, 505.361000, 855 )
insert into invoiceTree VALUES ( 1876, 503.291000, 856 )
insert into invoiceTree VALUES ( 1877, 501.214000, 857 )
insert into invoiceTree VALUES ( 1878, 499.129000, 858 )
insert into invoiceTree VALUES ( 1879, 497.035000, 859 )
insert into invoiceTree VALUES ( 1880, 494.934000, 860 )
insert into invoiceTree VALUES ( 1881, 492.825000, 861 )
insert into invoiceTree VALUES ( 1882, 490.707000, 862 )
insert into invoiceTree VALUES ( 1883, 488.581000, 863 )
insert into invoiceTree VALUES ( 1884, 486.446000, 864 )
insert into invoiceTree VALUES ( 1885, 484.302000, 865 )
insert into invoiceTree VALUES ( 1886, 482.150000, 866 )
insert into invoiceTree VALUES ( 1887, 479.989000, 867 )
insert into invoiceTree VALUES ( 1888, 477.819000, 868 )
insert into invoiceTree VALUES ( 1889, 475.640000, 869 )
insert into invoiceTree VALUES ( 1890, 473.451000, 870 )
insert into invoiceTree VALUES ( 1891, 471.253000, 871 )
insert into invoiceTree VALUES ( 1892, 469.046000, 872 )
insert into invoiceTree VALUES ( 1893, 466.829000, 873 )
insert into invoiceTree VALUES ( 1894, 464.602000, 874 )
insert into invoiceTree VALUES ( 1895, 462.365000, 875 )
insert into invoiceTree VALUES ( 1896, 460.118000, 876 )
insert into invoiceTree VALUES ( 1897, 457.861000, 877 )
insert into invoiceTree VALUES ( 1898, 455.594000, 878 )
insert into invoiceTree VALUES ( 1899, 453.316000, 879 )
insert into invoiceTree VALUES ( 1900, 451.027000, 880 )
insert into invoiceTree VALUES ( 1901, 448.727000, 881 )
insert into invoiceTree VALUES ( 1902, 446.417000, 882 )
insert into invoiceTree VALUES ( 1903, 444.095000, 883 )
insert into invoiceTree VALUES ( 1904, 441.761000, 884 )
insert into invoiceTree VALUES ( 1905, 439.417000, 885 )
insert into invoiceTree VALUES ( 1906, 437.060000, 886 )
insert into invoiceTree VALUES ( 1907, 434.692000, 887 )
insert into invoiceTree VALUES ( 1908, 432.311000, 888 )
insert into invoiceTree VALUES ( 1909, 429.918000, 889 )
insert into invoiceTree VALUES ( 1910, 427.512000, 890 )
insert into invoiceTree VALUES ( 1911, 425.094000, 891 )
insert into invoiceTree VALUES ( 1912, 422.663000, 892 )
insert into invoiceTree VALUES ( 1913, 420.218000, 893 )
insert into invoiceTree VALUES ( 1914, 417.760000, 894 )
insert into invoiceTree VALUES ( 1915, 415.288000, 895 )
insert into invoiceTree VALUES ( 1916, 412.803000, 896 )
insert into invoiceTree VALUES ( 1917, 410.303000, 897 )
insert into invoiceTree VALUES ( 1918, 407.789000, 898 )
insert into invoiceTree VALUES ( 1919, 405.260000, 899 )
insert into invoiceTree VALUES ( 1920, 402.716000, 900 )
insert into invoiceTree VALUES ( 1921, 400.157000, 901 )
insert into invoiceTree VALUES ( 1922, 397.582000, 902 )
insert into invoiceTree VALUES ( 1923, 394.991000, 903 )
insert into invoiceTree VALUES ( 1924, 392.384000, 904 )
insert into invoiceTree VALUES ( 1925, 389.761000, 905 )
insert into invoiceTree VALUES ( 1926, 387.120000, 906 )
insert into invoiceTree VALUES ( 1927, 384.463000, 907 )
insert into invoiceTree VALUES ( 1928, 381.788000, 908 )
insert into invoiceTree VALUES ( 1929, 379.095000, 909 )
insert into invoiceTree VALUES ( 1930, 376.383000, 910 )
insert into invoiceTree VALUES ( 1931, 373.653000, 911 )
insert into invoiceTree VALUES ( 1932, 370.904000, 912 )
insert into invoiceTree VALUES ( 1933, 368.135000, 913 )
insert into invoiceTree VALUES ( 1934, 365.347000, 914 )
insert into invoiceTree VALUES ( 1935, 362.537000, 915 )
insert into invoiceTree VALUES ( 1936, 359.707000, 916 )
insert into invoiceTree VALUES ( 1937, 356.855000, 917 )
insert into invoiceTree VALUES ( 1938, 353.982000, 918 )
insert into invoiceTree VALUES ( 1939, 351.085000, 919 )
insert into invoiceTree VALUES ( 1940, 348.166000, 920 )
insert into invoiceTree VALUES ( 1941, 345.223000, 921 )
insert into invoiceTree VALUES ( 1942, 342.256000, 922 )
insert into invoiceTree VALUES ( 1943, 339.264000, 923 )
insert into invoiceTree VALUES ( 1944, 336.246000, 924 )
insert into invoiceTree VALUES ( 1945, 333.202000, 925 )
insert into invoiceTree VALUES ( 1946, 330.131000, 926 )
insert into invoiceTree VALUES ( 1947, 327.032000, 927 )
insert into invoiceTree VALUES ( 1948, 323.904000, 928 )
insert into invoiceTree VALUES ( 1949, 320.748000, 929 )
insert into invoiceTree VALUES ( 1950, 317.560000, 930 )
insert into invoiceTree VALUES ( 1951, 314.342000, 931 )
insert into invoiceTree VALUES ( 1952, 311.092000, 932 )
insert into invoiceTree VALUES ( 1953, 307.808000, 933 )
insert into invoiceTree VALUES ( 1954, 304.490000, 934 )
insert into invoiceTree VALUES ( 1955, 301.137000, 935 )
insert into invoiceTree VALUES ( 1956, 297.747000, 936 )
insert into invoiceTree VALUES ( 1957, 294.319000, 937 )
insert into invoiceTree VALUES ( 1958, 290.852000, 938 )
insert into invoiceTree VALUES ( 1959, 287.344000, 939 )
insert into invoiceTree VALUES ( 1960, 283.794000, 940 )
insert into invoiceTree VALUES ( 1961, 280.201000, 941 )
insert into invoiceTree VALUES ( 1962, 276.562000, 942 )
insert into invoiceTree VALUES ( 1963, 272.875000, 943 )
insert into invoiceTree VALUES ( 1964, 269.140000, 944 )
insert into invoiceTree VALUES ( 1965, 265.353000, 945 )
insert into invoiceTree VALUES ( 1966, 261.513000, 946 )
insert into invoiceTree VALUES ( 1967, 257.616000, 947 )
insert into invoiceTree VALUES ( 1968, 253.662000, 948 )
insert into invoiceTree VALUES ( 1969, 249.646000, 949 )
insert into invoiceTree VALUES ( 1970, 245.566000, 950 )
insert into invoiceTree VALUES ( 1971, 241.418000, 951 )
insert into invoiceTree VALUES ( 1972, 237.199000, 952 )
insert into invoiceTree VALUES ( 1973, 232.905000, 953 )
insert into invoiceTree VALUES ( 1974, 228.532000, 954 )
insert into invoiceTree VALUES ( 1975, 224.075000, 955 )
insert into invoiceTree VALUES ( 1976, 219.530000, 956 )
insert into invoiceTree VALUES ( 1977, 214.889000, 957 )
insert into invoiceTree VALUES ( 1978, 210.148000, 958 )
insert into invoiceTree VALUES ( 1979, 205.299000, 959 )
insert into invoiceTree VALUES ( 1980, 200.335000, 960 )
insert into invoiceTree VALUES ( 1981, 195.246000, 961 )
insert into invoiceTree VALUES ( 1982, 190.022000, 962 )
insert into invoiceTree VALUES ( 1983, 184.653000, 963 )
insert into invoiceTree VALUES ( 1984, 179.125000, 964 )
insert into invoiceTree VALUES ( 1985, 173.422000, 965 )
insert into invoiceTree VALUES ( 1986, 167.528000, 966 )
insert into invoiceTree VALUES ( 1987, 161.420000, 967 )
insert into invoiceTree VALUES ( 1988, 155.075000, 968 )
insert into invoiceTree VALUES ( 1989, 148.460000, 969 )
insert into invoiceTree VALUES ( 1990, 141.539000, 970 )
insert into invoiceTree VALUES ( 1991, 134.265000, 971 )
insert into invoiceTree VALUES ( 1992, 126.576000, 972 )
insert into invoiceTree VALUES ( 1993, 118.391000, 973 )
insert into invoiceTree VALUES ( 1994, 109.599000, 974 )
insert into invoiceTree VALUES ( 1995, 100.042000, 975 )
insert into invoiceTree VALUES ( 1996, 89.473000, 976 )
insert into invoiceTree VALUES ( 1997, 77.479000, 977 )
insert into invoiceTree VALUES ( 1998, 63.256000, 978 )
insert into invoiceTree VALUES ( 1999, 44.725000, 979 )
insert into invoiceTree VALUES ( 2000, 0, 980 )


go


select * from invoiceTree
go



select * from test where id < 500

create PROC ancestorsAndSelf(@start int)
AS
go

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>> Example 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-- CTE produces a resultset that includes a node and all of its ancestors


-- start with invoice that has id = @start
alter proc ancestorsAndSelf(@start int)
AS
-- CTE produces amount, parent, and id
with ancestor(amount, parent, id) as
-- anchor selects the invoice passed into sproc
(select amount, parent, id from invoiceTree where id = @start
UNION ALL
-- recursive member
-- run reapeatedly with result of previous recursion
-- each recursion produces the parent of the current invoice
select I.amount, I.parent, I.id from invoiceTree as I  
inner join ancestor as D on D.parent = I.id
)
-- results include the id and amount for each ancestor and self invoice
SELECT id, amount from ancestor
go

exec ancestorsAndSelf 2
exec ancestorsAndSelf 900
go

create PROCEDURE ancestorsAmount(@start int)
as
go
-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  Example 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-- produces the aggreage amount of the invoice passed into the 
-- sproc and all of its ancestors
alter PROCEDURE ancestorsAmount(@start int)
as
with ancestor(amount, parent, id) as
(select amount, parent, id from invoiceTree where id = @start
UNION ALL
select I.amount, I.parent, I.id from invoiceTree as I  inner join ancestor as D on D.parent = I.id
)
-- only difference from previous exmaple
-- do sum of all the invoices found
SELECT sum(amount) from ancestor

go

exec ancestorsAmount 2
exec ancestorsAmount 900
go



-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Example 3 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
create PROCEDURE descendants(@start int)
as
go
-- produces invoice and allow of its descendants
-- same as example 1, except as noted below
alter PROCEDURE descendants(@start int)
as
with descendant(parent, id, amount) as
(select parent, id, amount from invoiceTree where id = @start
UNION ALL
-- note that join is on the parent of the current node and invoice
-- of previous one
select I.parent, I.id, I.amount from invoiceTree as I  inner join descendant  as A on A.id = I.parent
)
SELECT id from descendant

go

exec descendants  2
exec descendants  900

go


-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  example 5 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
create PROCEDURE descendantsAmount(@start int)
as
go
-- calculates aggregate sum of amounts for descendants
alter PROCEDURE descendantsAmount(@start int)
as
with descendant(parent, id, amount) as
(select parent, id, amount from invoiceTree where id = @start
UNION ALL
select I.parent, I.id, I.amount from invoiceTree as I  inner join descendant  as A on A.id = I.parent
)
SELECT id from descendant

go

exec descendantsAmount  2
exec descendantsAmount  900
go


create PROCEDURE descendantsLimited(@start int, @depth int)
as
go
alter PROCEDURE descendantsLimited(@start int, @depth int)
as
with descendant(parent, id, amount, level ) as
(select parent, id, amount, 1 from invoiceTree where id = @start
UNION ALL
select I.parent, I.id, I.amount, level + 1 from invoiceTree as I  inner join descendant  as A on A.id = I.parent
where level < @depth
)
SELECT id from descendant

go

exec descendantsLimited  2, 10
exec descendantsLimited  900, 10


select * from invoiceTree


-- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Example 5 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

create PROCEDURE descendantLeafs(@start int)
as
go
-- returns all the descendants of the @start invoice
-- that have not descendants themselves, i.e. leaf's
-- not branches
alter PROCEDURE descendantLeafs(@start int)
as
with descendant(parent, id, amount, level ) as
(select parent, id, amount, 1 from invoiceTree where id = @start
UNION ALL
select I.parent, I.id, I.amount, level + 1 from invoiceTree as I  inner join descendant  as A on A.id = I.parent
)
-- note that this is the same as decendants results, except that 
-- non leafs are pruned
SELECT id from descendant AS D where not exists (select id from invoiceTree as I where I.parent = D.id) 

go

exec descendantLeafs 2
exec descendantLeafs 900

go

-- >>>>>>>>>>>>>>>>>>>>>>>>>>>> Example 6 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

create PROCEDURE descendantsLevel(@start int, @depth int)
as
go
-- returns descendants that are at a particular level, for example 3 down
alter PROCEDURE descendantsLevel(@start int, @depth int)
as
with descendant(parent, id, amount, level ) as
(select parent, id, amount, 1 from invoiceTree where id = @start
UNION ALL
select I.parent, I.id, I.amount, level + 1 from invoiceTree as I  inner join descendant  as A on A.id = I.parent
where level < @depth
)
SELECT id from descendant AS D where not exists (select id from invoiceTree as I where I.parent = D.id)

go

exec descendantsLevel  2, 10
exec descendantsLevel  900, 10

go


-- >>>>>>>>>>>>>>>>>>>>>>>>>>>  example 6 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-- just shows that CTE can be in a view
create view test (id, amount)
as
select * from invoiceTree
go

alter view test (id, amount)
as
with ancestor(amount, parent, id) as
(select amount, parent, id from invoiceTree where id = (select max(id) from invoiceTree)
UNION ALL
select I.amount, I.parent, I.id from invoiceTree as I  inner join ancestor as D on D.parent = I.id
)
SELECT id, amount from ancestor
go
