Datasets:
File size: 35,297 Bytes
7e5adcc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 | {
"engine": "misata_engine (Misata Studio)",
"engine_commit": "24649abbce5fb439a79f388e827562d798f71488 with uncommitted engine changes, source digest e88cd0793a53941e",
"seed": 20261030,
"scale": 1.0,
"seconds": 530.9,
"passed": true,
"lint": [
"order_lines.unit_price: copy_from products.list_price@product_id reads a worked-out column, not yet there when this is drawn; make unit_price a formula: \"products.list_price@product_id + normal(0, ...)\""
],
"planned": [
"orders: 1,199,998 rows, the months claim orders_by_month states, straight between them and level beyond (the design made 1,200,000)"
],
"notes": [
"orders: 1,199,998 rows, the months claim orders_by_month states, straight between them and level beyond (the design made 1,200,000)"
],
"findings": [],
"certificate": {
"engine_version": "0.1.0",
"run_id": "d7fd6e427f34",
"route": "blueprint",
"blueprint_hash": "8bfaa303ab6c67acf1c09fe81fe35ca185a47c19dac3941b7124bc8ada9e467a",
"seed": 20261030,
"passed": true,
"claims": [
{
"id": "orders_by_month",
"kind": "count",
"target": "orders.order_id",
"text": null,
"source": "prompt",
"met": true,
"stated": "42 monthly row counts",
"actual": "42 of 42 exact",
"rows": [
{
"period": "2023-01",
"stated": 20015,
"actual": 20015
},
{
"period": "2023-02",
"stated": 17835,
"actual": 17835
},
{
"period": "2023-03",
"stated": 22483,
"actual": 22483
},
{
"period": "2023-04",
"stated": 22191,
"actual": 22191
},
{
"period": "2023-05",
"stated": 23620,
"actual": 23620
},
{
"period": "2023-06",
"stated": 22844,
"actual": 22844
},
{
"period": "2023-07",
"stated": 24071,
"actual": 24071
},
{
"period": "2023-08",
"stated": 24785,
"actual": 24785
},
{
"period": "2023-09",
"stated": 23026,
"actual": 23026
},
{
"period": "2023-10",
"stated": 25505,
"actual": 25505
},
{
"period": "2023-11",
"stated": 37738,
"actual": 37738
},
{
"period": "2023-12",
"stated": 38357,
"actual": 38357
},
{
"period": "2024-01",
"stated": 22417,
"actual": 22417
},
{
"period": "2024-02",
"stated": 20689,
"actual": 20689
},
{
"period": "2024-03",
"stated": 25181,
"actual": 25181
},
{
"period": "2024-04",
"stated": 24853,
"actual": 24853
},
{
"period": "2024-05",
"stated": 26455,
"actual": 26455
},
{
"period": "2024-06",
"stated": 25586,
"actual": 25586
},
{
"period": "2024-07",
"stated": 26959,
"actual": 26959
},
{
"period": "2024-08",
"stated": 27759,
"actual": 27759
},
{
"period": "2024-09",
"stated": 25789,
"actual": 25789
},
{
"period": "2024-10",
"stated": 28566,
"actual": 28566
},
{
"period": "2024-11",
"stated": 42266,
"actual": 42266
},
{
"period": "2024-12",
"stated": 42959,
"actual": 42959
},
{
"period": "2025-01",
"stated": 25107,
"actual": 25107
},
{
"period": "2025-02",
"stated": 22372,
"actual": 22372
},
{
"period": "2025-03",
"stated": 28203,
"actual": 28203
},
{
"period": "2025-04",
"stated": 26999,
"actual": 26999
},
{
"period": "2025-05",
"stated": 28739,
"actual": 28739
},
{
"period": "2025-06",
"stated": 27795,
"actual": 27795
},
{
"period": "2025-07",
"stated": 30194,
"actual": 30194
},
{
"period": "2025-08",
"stated": 31090,
"actual": 31090
},
{
"period": "2025-09",
"stated": 28884,
"actual": 28884
},
{
"period": "2025-10",
"stated": 31994,
"actual": 31994
},
{
"period": "2025-11",
"stated": 47338,
"actual": 47338
},
{
"period": "2025-12",
"stated": 48114,
"actual": 48114
}
]
},
{
"id": "apparel_return_rate",
"kind": "cohort",
"target": "returns.returned_qty",
"text": null,
"source": "prompt",
"met": true,
"stated": "returned qty over 39 monthly rates of order lines quantity, by the month of order date",
"actual": "39 of 39 months exact to the unit (2023-01 to 2026-03)",
"rows": [
{
"period": "2023-04",
"stated": 0.18,
"actual": 0.180026,
"units": 1954,
"of": 10854
},
{
"period": "2023-05",
"stated": 0.18,
"actual": 0.180015,
"units": 2106,
"of": 11699
},
{
"period": "2023-06",
"stated": 0.18,
"actual": 0.179982,
"units": 2005,
"of": 11140
},
{
"period": "2023-07",
"stated": 0.18,
"actual": 0.180002,
"units": 2018,
"of": 11211
},
{
"period": "2023-08",
"stated": 0.18,
"actual": 0.179992,
"units": 2303,
"of": 12795
},
{
"period": "2023-09",
"stated": 0.18,
"actual": 0.180038,
"units": 2078,
"of": 11542
},
{
"period": "2023-10",
"stated": 0.18,
"actual": 0.180039,
"units": 2300,
"of": 12775
},
{
"period": "2023-11",
"stated": 0.18,
"actual": 0.180026,
"units": 3160,
"of": 17553
},
{
"period": "2023-12",
"stated": 0.18,
"actual": 0.179975,
"units": 3248,
"of": 18047
},
{
"period": "2024-01",
"stated": 0.18,
"actual": 0.179973,
"units": 1711,
"of": 9507
},
{
"period": "2024-02",
"stated": 0.18,
"actual": 0.179949,
"units": 1707,
"of": 9486
},
{
"period": "2024-03",
"stated": 0.18,
"actual": 0.180003,
"units": 2389,
"of": 13272
},
{
"period": "2024-04",
"stated": 0.18,
"actual": 0.18,
"units": 2313,
"of": 12850
},
{
"period": "2024-05",
"stated": 0.18,
"actual": 0.179969,
"units": 2336,
"of": 12980
},
{
"period": "2024-06",
"stated": 0.18,
"actual": 0.180029,
"units": 2232,
"of": 12398
},
{
"period": "2024-07",
"stated": 0.18,
"actual": 0.180011,
"units": 2354,
"of": 13077
},
{
"period": "2024-08",
"stated": 0.18,
"actual": 0.179992,
"units": 2598,
"of": 14434
},
{
"period": "2024-09",
"stated": 0.18,
"actual": 0.180038,
"units": 2354,
"of": 13075
},
{
"period": "2024-10",
"stated": 0.18,
"actual": 0.180011,
"units": 2671,
"of": 14838
},
{
"period": "2024-11",
"stated": 0.18,
"actual": 0.180007,
"units": 3551,
"of": 19727
},
{
"period": "2024-12",
"stated": 0.18,
"actual": 0.179986,
"units": 3635,
"of": 20196
},
{
"period": "2025-01",
"stated": 0.18,
"actual": 0.180033,
"units": 1843,
"of": 10237
},
{
"period": "2025-02",
"stated": 0.18,
"actual": 0.179994,
"units": 1920,
"of": 10667
},
{
"period": "2025-03",
"stated": 0.18,
"actual": 0.179999,
"units": 2635,
"of": 14639
},
{
"period": "2025-04",
"stated": 0.18,
"actual": 0.180029,
"units": 2524,
"of": 14020
},
{
"period": "2025-05",
"stated": 0.18,
"actual": 0.180016,
"units": 2488,
"of": 13821
},
{
"period": "2025-06",
"stated": 0.18,
"actual": 0.180021,
"units": 2404,
"of": 13354
},
{
"period": "2025-07",
"stated": 0.18,
"actual": 0.179989,
"units": 2540,
"of": 14112
},
{
"period": "2025-08",
"stated": 0.18,
"actual": 0.180005,
"units": 2825,
"of": 15694
},
{
"period": "2025-09",
"stated": 0.18,
"actual": 0.180004,
"units": 2688,
"of": 14933
},
{
"period": "2025-10",
"stated": 0.18,
"actual": 0.180016,
"units": 2960,
"of": 16443
},
{
"period": "2025-11",
"stated": 0.18,
"actual": 0.180006,
"units": 3792,
"of": 21066
},
{
"period": "2025-12",
"stated": 0.18,
"actual": 0.180004,
"units": 4078,
"of": 22655
},
{
"period": "2026-01",
"stated": 0.18,
"actual": 0.180034,
"units": 2119,
"of": 11770
},
{
"period": "2026-02",
"stated": 0.18,
"actual": 0.180037,
"units": 2114,
"of": 11742
},
{
"period": "2026-03",
"stated": 0.18,
"actual": 0.179978,
"units": 2970,
"of": 16502
}
]
}
],
"invariants": [],
"rules": {
"declared": 4,
"held": 2,
"broken": [],
"unmeasured": [
{
"kind": "fk_distinct",
"table": "products",
"column": "_variant_id",
"rule": "products rows sharing _brand_id point to different variants",
"rows": 1500,
"broken": 0,
"holds": false,
"measured": false,
"why": "could not be read (KeyError)"
},
{
"kind": "only_when",
"table": "orders",
"column": "customer_id",
"rule": "orders.customer_id is filled only when _guest == 0",
"rows": 1199998,
"broken": 0,
"holds": false,
"measured": false,
"why": "could not be read (ExpressionError)"
}
]
},
"findings": {
"critical": 0,
"major": 0,
"minor": 0,
"load": 0
},
"open_findings": [],
"audit": {
"score": 100.0,
"checked": false,
"reviewed": false,
"found": 0,
"fixed": 0
},
"tables": {
"stores": {
"rows": 41,
"digest": "e8138d4a243847be"
},
"products": {
"rows": 1500,
"digest": "2c6a75ff172b5f50"
},
"customers": {
"rows": 150000,
"digest": "34640675ab6f9a99"
},
"orders": {
"rows": 1199998,
"digest": "7cd2c0f6f5a5a7a0"
},
"order_lines": {
"rows": 3023975,
"digest": "37c5580ee2f2abc6"
},
"returns": {
"rows": 221756,
"digest": "7e9ca922085a8b4f"
}
},
"answer_key": [
{
"id": "orders_by_month",
"title": "Order_id by month",
"kind": "count",
"unit": "count",
"grain": "month",
"sql": "WITH months AS (SELECT m FROM generate_series(TIMESTAMP '2023-01-01', TIMESTAMP '2026-06-01', INTERVAL 1 MONTH) AS g(m)), x AS (SELECT date_trunc('month', \"order_date\") AS m, count(*) AS v FROM \"orders\" WHERE \"order_date\" IS NOT NULL GROUP BY 1) SELECT strftime(months.m, '%Y-%m') AS month, coalesce(v, 0) AS n FROM months LEFT JOIN x USING (m) ORDER BY month",
"column": "n",
"values": {
"2023-01": 20015.0,
"2023-02": 17835.0,
"2023-03": 22483.0,
"2023-04": 22191.0,
"2023-05": 23620.0,
"2023-06": 22844.0,
"2023-07": 24071.0,
"2023-08": 24785.0,
"2023-09": 23026.0,
"2023-10": 25505.0,
"2023-11": 37738.0,
"2023-12": 38357.0,
"2024-01": 22417.0,
"2024-02": 20689.0,
"2024-03": 25181.0,
"2024-04": 24853.0,
"2024-05": 26455.0,
"2024-06": 25586.0,
"2024-07": 26959.0,
"2024-08": 27759.0,
"2024-09": 25789.0,
"2024-10": 28566.0,
"2024-11": 42266.0,
"2024-12": 42959.0,
"2025-01": 25107.0,
"2025-02": 22372.0,
"2025-03": 28203.0,
"2025-04": 26999.0,
"2025-05": 28739.0,
"2025-06": 27795.0,
"2025-07": 30194.0,
"2025-08": 31090.0,
"2025-09": 28884.0,
"2025-10": 31994.0,
"2025-11": 47338.0,
"2025-12": 48114.0,
"2026-01": 28120.0,
"2026-02": 25057.0,
"2026-03": 31587.0,
"2026-04": 31176.0,
"2026-05": 33185.0,
"2026-06": 32095.0
},
"stated": {
"2023-01": 20015,
"2023-02": 17835,
"2023-03": 22483,
"2023-04": 22191,
"2023-05": 23620,
"2023-06": 22844,
"2023-07": 24071,
"2023-08": 24785,
"2023-09": 23026,
"2023-10": 25505,
"2023-11": 37738,
"2023-12": 38357,
"2024-01": 22417,
"2024-02": 20689,
"2024-03": 25181,
"2024-04": 24853,
"2024-05": 26455,
"2024-06": 25586,
"2024-07": 26959,
"2024-08": 27759,
"2024-09": 25789,
"2024-10": 28566,
"2024-11": 42266,
"2024-12": 42959,
"2025-01": 25107,
"2025-02": 22372,
"2025-03": 28203,
"2025-04": 26999,
"2025-05": 28739,
"2025-06": 27795,
"2025-07": 30194,
"2025-08": 31090,
"2025-09": 28884,
"2025-10": 31994,
"2025-11": 47338,
"2025-12": 48114,
"2026-01": 28120,
"2026-02": 25057,
"2026-03": 31587,
"2026-04": 31176,
"2026-05": 33185,
"2026-06": 32095
},
"source": "prompt",
"text": null,
"adds_up": true
},
{
"id": "apparel_return_rate",
"title": "Returned_qty over order lines quantity, by month",
"kind": "cohort",
"unit": "fraction",
"grain": "month",
"sql": "SELECT strftime(\"order_lines\".\"order_date\", '%Y-%m') AS month, round(coalesce(sum(\"returns\".\"returned_qty\"), 0) * 1.0 / sum(\"order_lines\".\"quantity\"), 6) AS rate, coalesce(sum(\"returns\".\"returned_qty\"), 0) AS units, sum(\"order_lines\".\"quantity\") AS of_units FROM \"order_lines\" JOIN \"products\" ON \"products\".\"product_id\" = \"order_lines\".\"product_id\" LEFT JOIN \"returns\" ON \"returns\".\"order_line_id\" = \"order_lines\".\"order_line_id\" WHERE strftime(\"order_lines\".\"order_date\", '%Y-%m') IN ('2023-01', '2023-02', '2023-03', '2023-04', '2023-05', '2023-06', '2023-07', '2023-08', '2023-09', '2023-10', '2023-11', '2023-12', '2024-01', '2024-02', '2024-03', '2024-04', '2024-05', '2024-06', '2024-07', '2024-08', '2024-09', '2024-10', '2024-11', '2024-12', '2025-01', '2025-02', '2025-03', '2025-04', '2025-05', '2025-06', '2025-07', '2025-08', '2025-09', '2025-10', '2025-11', '2025-12', '2026-01', '2026-02', '2026-03') AND \"products\".\"category\" IN ('Apparel') GROUP BY 1 ORDER BY 1",
"column": "rate",
"values": {
"2023-01": 0.180049,
"2023-02": 0.179979,
"2023-03": 0.18,
"2023-04": 0.180026,
"2023-05": 0.180015,
"2023-06": 0.179982,
"2023-07": 0.180002,
"2023-08": 0.179992,
"2023-09": 0.180038,
"2023-10": 0.180039,
"2023-11": 0.180026,
"2023-12": 0.179975,
"2024-01": 0.179973,
"2024-02": 0.179949,
"2024-03": 0.180003,
"2024-04": 0.18,
"2024-05": 0.179969,
"2024-06": 0.180029,
"2024-07": 0.180011,
"2024-08": 0.179992,
"2024-09": 0.180038,
"2024-10": 0.180011,
"2024-11": 0.180007,
"2024-12": 0.179986,
"2025-01": 0.180033,
"2025-02": 0.179994,
"2025-03": 0.179999,
"2025-04": 0.180029,
"2025-05": 0.180016,
"2025-06": 0.180021,
"2025-07": 0.179989,
"2025-08": 0.180005,
"2025-09": 0.180004,
"2025-10": 0.180016,
"2025-11": 0.180006,
"2025-12": 0.180004,
"2026-01": 0.180034,
"2026-02": 0.180037,
"2026-03": 0.179978
},
"stated": {
"2023-01": 0.180049,
"2023-02": 0.179979,
"2023-03": 0.18,
"2023-04": 0.180026,
"2023-05": 0.180015,
"2023-06": 0.179982,
"2023-07": 0.180002,
"2023-08": 0.179992,
"2023-09": 0.180038,
"2023-10": 0.180039,
"2023-11": 0.180026,
"2023-12": 0.179975,
"2024-01": 0.179973,
"2024-02": 0.179949,
"2024-03": 0.180003,
"2024-04": 0.18,
"2024-05": 0.179969,
"2024-06": 0.180029,
"2024-07": 0.180011,
"2024-08": 0.179992,
"2024-09": 0.180038,
"2024-10": 0.180011,
"2024-11": 0.180007,
"2024-12": 0.179986,
"2025-01": 0.180033,
"2025-02": 0.179994,
"2025-03": 0.179999,
"2025-04": 0.180029,
"2025-05": 0.180016,
"2025-06": 0.180021,
"2025-07": 0.179989,
"2025-08": 0.180005,
"2025-09": 0.180004,
"2025-10": 0.180016,
"2025-11": 0.180006,
"2025-12": 0.180004,
"2026-01": 0.180034,
"2026-02": 0.180037,
"2026-03": 0.179978
},
"source": "prompt",
"text": null,
"adds_up": false,
"parts": {
"units": {
"2023-01": 1480.0,
"2023-02": 1530.0,
"2023-03": 2052.0,
"2023-04": 1954.0,
"2023-05": 2106.0,
"2023-06": 2005.0,
"2023-07": 2018.0,
"2023-08": 2303.0,
"2023-09": 2078.0,
"2023-10": 2300.0,
"2023-11": 3160.0,
"2023-12": 3248.0,
"2024-01": 1711.0,
"2024-02": 1707.0,
"2024-03": 2389.0,
"2024-04": 2313.0,
"2024-05": 2336.0,
"2024-06": 2232.0,
"2024-07": 2354.0,
"2024-08": 2598.0,
"2024-09": 2354.0,
"2024-10": 2671.0,
"2024-11": 3551.0,
"2024-12": 3635.0,
"2025-01": 1843.0,
"2025-02": 1920.0,
"2025-03": 2635.0,
"2025-04": 2524.0,
"2025-05": 2488.0,
"2025-06": 2404.0,
"2025-07": 2540.0,
"2025-08": 2825.0,
"2025-09": 2688.0,
"2025-10": 2960.0,
"2025-11": 3792.0,
"2025-12": 4078.0,
"2026-01": 2119.0,
"2026-02": 2114.0,
"2026-03": 2970.0
},
"of_units": {
"2023-01": 8220.0,
"2023-02": 8501.0,
"2023-03": 11400.0,
"2023-04": 10854.0,
"2023-05": 11699.0,
"2023-06": 11140.0,
"2023-07": 11211.0,
"2023-08": 12795.0,
"2023-09": 11542.0,
"2023-10": 12775.0,
"2023-11": 17553.0,
"2023-12": 18047.0,
"2024-01": 9507.0,
"2024-02": 9486.0,
"2024-03": 13272.0,
"2024-04": 12850.0,
"2024-05": 12980.0,
"2024-06": 12398.0,
"2024-07": 13077.0,
"2024-08": 14434.0,
"2024-09": 13075.0,
"2024-10": 14838.0,
"2024-11": 19727.0,
"2024-12": 20196.0,
"2025-01": 10237.0,
"2025-02": 10667.0,
"2025-03": 14639.0,
"2025-04": 14020.0,
"2025-05": 13821.0,
"2025-06": 13354.0,
"2025-07": 14112.0,
"2025-08": 15694.0,
"2025-09": 14933.0,
"2025-10": 16443.0,
"2025-11": 21066.0,
"2025-12": 22655.0,
"2026-01": 11770.0,
"2026-02": 11742.0,
"2026-03": 16502.0
}
},
"ratio_of": [
"units",
"of_units"
]
},
{
"id": "rows:cities",
"title": "Rows in cities",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"cities\"",
"column": "n",
"values": {
"all": 60.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:subcategories",
"title": "Rows in subcategories",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"subcategories\"",
"column": "n",
"values": {
"all": 30.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:brands",
"title": "Rows in brands",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"brands\"",
"column": "n",
"values": {
"all": 32.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:variants",
"title": "Rows in variants",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"variants\"",
"column": "n",
"values": {
"all": 1085.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:stores",
"title": "Rows in stores",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"stores\"",
"column": "n",
"values": {
"all": 41.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:products",
"title": "Rows in products",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"products\"",
"column": "n",
"values": {
"all": 1500.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:customers",
"title": "Rows in customers",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"customers\"",
"column": "n",
"values": {
"all": 150000.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:orders",
"title": "Rows in orders",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"orders\"",
"column": "n",
"values": {
"all": 1199998.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:order_lines",
"title": "Rows in order lines",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"order_lines\"",
"column": "n",
"values": {
"all": 3023975.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
},
{
"id": "rows:returns",
"title": "Rows in returns",
"kind": "count",
"unit": "count",
"grain": "whole",
"sql": "SELECT count(*) AS n FROM \"returns\"",
"column": "n",
"values": {
"all": 221756.0
},
"stated": {},
"source": "data",
"text": null,
"adds_up": false
}
],
"sql_check": [
{
"id": "orders_by_month",
"kind": "count",
"holds": true,
"compared": 42,
"wrong": []
},
{
"id": "apparel_return_rate",
"kind": "cohort",
"holds": null,
"note": "no SQL reading: a shape, or a rate per period, held by the certificate's own check"
}
],
"patterns": [],
"realism": {
"facts": [
{
"fact": "uneven_activity",
"where": "orders per customer",
"value": 2.0071,
"typical": true,
"note": "the busiest 10% of customers hold 59% of orders"
},
{
"fact": "uneven_activity",
"where": "orders per store",
"value": 1.9284,
"typical": true,
"note": "the busiest 10% of stores hold 40% of orders"
}
],
"typical": 2,
"measured": 2
},
"scorecard": {
"score": 100.0,
"families": {
"dependency": {
"score": 100.0,
"pass": 3,
"weak": 0,
"fail": 0
},
"popularity": {
"score": 100.0,
"pass": 2,
"weak": 0,
"fail": 0
},
"time_order": {
"score": 100.0,
"pass": 3,
"weak": 0,
"fail": 0
},
"concentration": {
"score": 100.0,
"pass": 4,
"weak": 0,
"fail": 0
},
"prices": {
"score": 100.0,
"pass": 1,
"weak": 0,
"fail": 0
},
"artifacts": {
"score": 100.0,
"pass": 0,
"weak": 0,
"fail": 0
}
},
"measured_on": "the whole run",
"checks": [
{
"family": "dependency",
"check": "shuffled_copy_auc",
"where": "products",
"status": "pass",
"value": 0.945,
"bar": "pass ≥ 0.75, weak ≥ 0.6 (0.5 = independent)",
"text": "a classifier tells products from a column-shuffled copy with AUC 0.945 over 3 features"
},
{
"family": "dependency",
"check": "shuffled_copy_auc",
"where": "customers",
"status": "pass",
"value": 0.98,
"bar": "pass ≥ 0.75, weak ≥ 0.6 (0.5 = independent)",
"text": "a classifier tells customers from a column-shuffled copy with AUC 0.98 over 6 features"
},
{
"family": "dependency",
"check": "shuffled_copy_auc",
"where": "order_lines",
"status": "pass",
"value": 0.941,
"bar": "pass ≥ 0.75, weak ≥ 0.6 (0.5 = independent)",
"text": "a classifier tells order_lines from a column-shuffled copy with AUC 0.941 over 6 features"
},
{
"family": "dependency",
"check": "shuffled_copy_auc",
"where": "returns",
"status": "note",
"value": 0.505,
"bar": "judged on 4 or more columns",
"text": "a classifier tells returns from a column-shuffled copy with AUC 0.505 over only 3 columns (4 features); too few columns to judge"
},
{
"family": "popularity",
"check": "top_to_median",
"where": "orders.store_id → stores",
"status": "pass",
"value": 18.8099,
"bar": "pass ≥ 3×, weak ≥ 1.6×",
"text": "the most chosen of stores appears 18.8× as often as the median one",
"at": {
"table": "orders",
"column": "store_id",
"parent": "stores"
}
},
{
"family": "popularity",
"check": "top_to_median",
"where": "order_lines.product_id → products",
"status": "pass",
"value": 60.8686,
"bar": "pass ≥ 3×, weak ≥ 1.6×",
"text": "the most chosen of products appears 60.9× as often as the median one",
"at": {
"table": "order_lines",
"column": "product_id",
"parent": "products"
}
},
{
"family": "time_order",
"check": "child_before_parent",
"where": "orders.order_date vs customers.signup_date",
"status": "pass",
"value": 0.0,
"bar": "≤ 0.2% (weak ≤ 1%)",
"text": "0.00% of orders are dated before their customer's signup date",
"at": {
"table": "orders",
"column": "order_date",
"fk": "customer_id",
"parent": "customers",
"parent_column": "signup_date"
}
},
{
"family": "time_order",
"check": "child_before_parent",
"where": "order_lines.order_date vs orders.order_date",
"status": "pass",
"value": 0.0,
"bar": "≤ 0.2% (weak ≤ 1%)",
"text": "0.00% of order_lines are dated before their order's order date",
"at": {
"table": "order_lines",
"column": "order_date",
"fk": "order_id",
"parent": "orders",
"parent_column": "order_date"
}
},
{
"family": "time_order",
"check": "child_before_parent",
"where": "returns.return_date vs order_lines.order_date",
"status": "pass",
"value": 0.0,
"bar": "≤ 0.2% (weak ≤ 1%)",
"text": "0.00% of returns are dated before their order_line's order date",
"at": {
"table": "returns",
"column": "return_date",
"fk": "order_line_id",
"parent": "order_lines",
"parent_column": "order_date"
}
},
{
"family": "concentration",
"check": "uneven_activity",
"where": "orders per customer",
"status": "pass",
"value": 0.7719,
"bar": "top 20% share pass ≥ 45%, weak ≥ 35% (a random deal gives 30%)",
"text": "the busiest 20% of customers hold 77% of orders (top 1%: 13%; CV 2.01); dealt at random they would hold 30%",
"source": "real retail: the top 20% of customers hold 50-65% of sales (Sharp, Romaniuk & Graham 2019) and 73% across 22 packaged-goods categories (Kim, Singh & Winer 2017); a UK online retailer's records (UCI Online Retail II): 64% of orders and 77% of revenue by customer, 68% of order lines and 80% of revenue by product",
"at": {
"table": "orders",
"column": "customer_id",
"parent": "customers"
},
"pass_at": 0.45
},
{
"family": "concentration",
"check": "uneven_value",
"where": "orders value per customer",
"status": "pass",
"value": 0.8228,
"bar": "top 20% share pass ≥ 67%, weak ≥ 55% (a random deal gives 48%)",
"text": "the top 20% of customers hold 82% of the money in orders (top 1%: 15%); dealt at random they would hold 48%",
"source": "real retail: the top 20% of customers hold 50-65% of sales (Sharp, Romaniuk & Graham 2019) and 73% across 22 packaged-goods categories (Kim, Singh & Winer 2017); a UK online retailer's records (UCI Online Retail II): 64% of orders and 77% of revenue by customer, 68% of order lines and 80% of revenue by product"
},
{
"family": "concentration",
"check": "uneven_activity",
"where": "order_lines per product",
"status": "pass",
"value": 0.592,
"bar": "top 20% share pass ≥ 45%, weak ≥ 30% (a random deal gives 21%)",
"text": "the busiest 20% of products hold 59% of order_lines (top 1%: 12%; CV 1.62); dealt at random they would hold 21%",
"source": "real retail: the top 20% of customers hold 50-65% of sales (Sharp, Romaniuk & Graham 2019) and 73% across 22 packaged-goods categories (Kim, Singh & Winer 2017); a UK online retailer's records (UCI Online Retail II): 64% of orders and 77% of revenue by customer, 68% of order lines and 80% of revenue by product",
"at": {
"table": "order_lines",
"column": "product_id",
"parent": "products"
},
"pass_at": 0.45
},
{
"family": "concentration",
"check": "uneven_value",
"where": "order_lines value per product",
"status": "pass",
"value": 0.7099,
"bar": "top 20% share pass ≥ 50%, weak ≥ 35% (a random deal gives 22%)",
"text": "the top 20% of products hold 71% of the money in order_lines (top 1%: 23%); dealt at random they would hold 22%",
"source": "real retail: the top 20% of customers hold 50-65% of sales (Sharp, Romaniuk & Graham 2019) and 73% across 22 packaged-goods categories (Kim, Singh & Winer 2017); a UK online retailer's records (UCI Online Retail II): 64% of orders and 77% of revenue by customer, 68% of order lines and 80% of revenue by product"
},
{
"family": "prices",
"check": "price_endings",
"where": "order_lines.unit_price",
"status": "pass",
"value": 0.7995,
"bar": "the 5 commonest cents hold ≥ 35% of the prices (weak ≥ 20%; 5% at random)",
"text": "384 distinct prices in order_lines.unit_price; the 5 commonest cents (99, 00, 95, 98, 97) hold 80%",
"source": "prices are set by someone: a UK online retailer's 144 prices (UCI Online Retail II) end in .95, .25, .65, .85 and .75 two times in three; prices drawn at random spread their cents evenly (5% for any five)"
}
],
"coverage": {
"checks": 13,
"families": [
"concentration",
"dependency",
"popularity",
"prices",
"time_order"
],
"tables": [
"customers",
"order_lines",
"orders",
"products",
"returns",
"stores"
],
"of_tables": 6,
"enough": true
}
},
"realism_report": {
"findings": [],
"checks": 14,
"clean_tables": 1.0
},
"scenario": {
"future": false,
"window": [
"2023-01-01",
"2026-06-30"
],
"note": "The window ends in the future: this is a simulated scenario built from structural assumptions and the events you described, not a forecast."
},
"understanding": {},
"content": {},
"degraded": false,
"working_tables": {
"brands": {
"rows": 32
},
"cities": {
"rows": 60
},
"subcategories": {
"rows": 30
},
"variants": {
"rows": 1085
}
}
},
"realism_scorecard": "realism 98.1\n dependency 100 popularity 100 consistency 100 time_order 100 concentration 100 rhythm 83 prices 100 text 100 artifacts 100\n weak rhythm returns.return_date: the busiest weekday has 1.02x the quietest's rows in returns (p = 0.362 against every day alike); every weekday alike, as a random date gives\n note dependency returns: a classifier tells returns from a column-shuffled copy with AUC 0.505 over only 3 columns (4 features); too few columns to judge\n pass concentration orders per customer: the busiest 20% of customers hold 77% of orders (top 1%: 13%; CV 2.01); dealt at random they would hold 30%\n pass concentration orders value per customer: the top 20% of customers hold 82% of the money in orders (top 1%: 17%); dealt at random they would hold 44%\n pass concentration order_lines per product: the busiest 20% of products hold 59% of order_lines (top 1%: 12%; CV 1.62); dealt at random they would hold 21%\n pass concentration order_lines value per product: the top 20% of products hold 65% of the money in order_lines (top 1%: 18%); dealt at random they would hold 22%\n pass consistency order_lines.unit_price: order_lines.unit_price is within half to twice its products.list_price on 100% of rows (median 1.00x)\n pass consistency order_lines.unit_price: 0.1% of order_lines sell under their products.unit_cost after discount_pct\n pass consistency products.list_price: 0% of products sell under their unit_cost\n pass consistency order_lines.net_amount: order_lines.net_amount equals quantity × unit_price × (1 − discount_pct) on 100% of rows\n pass consistency order_lines.unit_price: 0% of order_lines sell under their unit_cost\n pass dependency products: a classifier tells products from a column-shuffled copy with AUC 0.989 over 5 features\n pass dependency customers: a classifier tells customers from a column-shuffled copy with AUC 0.98 over 6 features\n pass dependency order_lines: a classifier tells order_lines from a column-shuffled copy with AUC 0.998 over 8 features\n pass popularity order_lines.product_id → products: the most chosen of products appears 60.9× as often as the median one\n pass prices products.list_price: 384 distinct prices in products.list_price; the 5 commonest cents (99, 00, 95, 98, 97) hold 80%\n pass prices order_lines.unit_price: 384 distinct prices in order_lines.unit_price; the 5 commonest cents (99, 00, 95, 98, 97) hold 80%\n pass rhythm orders.order_date: the busiest weekday has 1.32x the quietest's rows in orders (p = 0 against every day alike)\n pass rhythm order_lines.order_date: the busiest weekday has 1.32x the quietest's rows in order_lines (p = 0 against every day alike)\n pass text products.product_name: 1,500 distinct texts in 1,500 rows of products.product_name\n pass time_order orders.order_date vs customers.signup_date: 0.00% of orders are dated before their customer's signup date\n pass time_order order_lines.order_date vs orders.order_date: 0.00% of order_lines are dated before their order's order date\n pass time_order order_lines.order_date vs customers.signup_date: 0.00% of order_lines are dated before their customer's signup date\n pass time_order returns.return_date vs order_lines.order_date: 0.00% of returns are dated before their order_line's order date",
"rows": {
"stores": 41,
"products": 1500,
"customers": 150000,
"orders": 1199998,
"order_lines": 3023975,
"returns": 221756
}
} |