import file=tpch_schema
----

import file=tpch_stats
----

# --------------------------------------------------
# Q16
# Parts/Supplier Relationship
# Finds out how many suppliers can supply parts with given attributes. It might
# be used, for example, to determine whether there is a sufficient number of
# suppliers for heavily ordered parts.
#
# Counts the number of suppliers who can supply parts that satisfy a particular
# customer's requirements. The customer is interested in parts of eight
# different sizes as long as they are not of a given type, not of a given brand,
# and not from a supplier who has had complaints registered at the Better
# Business Bureau. Results must be presented in descending count and ascending
# brand, type, and size.
# --------------------------------------------------
stats-quality database=tpch set=save_tables_prefix=q16
SELECT
    p_brand,
    p_type,
    p_size,
    count(DISTINCT ps_suppkey) AS supplier_cnt
FROM
    partsupp,
    part
WHERE
    p_partkey = ps_partkey
    AND p_brand <> 'Brand#45'
    AND p_type NOT LIKE 'MEDIUM POLISHED %'
    AND p_size IN (49, 14, 23, 45, 19, 3, 36, 9)
    AND ps_suppkey NOT IN (
        SELECT
            s_suppkey
        FROM
            supplier
        WHERE
            s_comment LIKE '%Customer%Complaints%'
    )
GROUP BY
    p_brand,
    p_type,
    p_size
ORDER BY
    supplier_cnt DESC,
    p_brand,
    p_type,
    p_size;
----
----
sort
 ├── save-table-name: q16_sort_1
 ├── columns: p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null) supplier_cnt:29(int!null)
 ├── stats: [rows=9929.297, distinct(11)=24.9999, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=8, null(13)=0, distinct(29)=9929.3, null(29)=0, distinct(11-13)=9929.3, null(11-13)=0]
 ├── key: (11-13)
 ├── fd: (11-13)-->(29)
 ├── ordering: -29,+11,+12,+13
 └── group-by (hash)
      ├── save-table-name: q16_group_by_2
      ├── columns: p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null) count:29(int!null)
      ├── grouping columns: p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      ├── stats: [rows=9929.297, distinct(11)=24.9999, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=8, null(13)=0, distinct(29)=9929.3, null(29)=0, distinct(11-13)=9929.3, null(11-13)=0]
      ├── key: (11-13)
      ├── fd: (11-13)-->(29)
      ├── distinct-on
      │    ├── save-table-name: q16_distinct_on_3
      │    ├── columns: ps_suppkey:2(int!null) p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      │    ├── grouping columns: ps_suppkey:2(int!null) p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      │    ├── stats: [rows=28797.62, distinct(2)=9375.8, null(2)=0, distinct(11)=24.9999, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=8, null(13)=0, distinct(11-13)=9929.3, null(11-13)=0, distinct(2,11-13)=28797.6, null(2,11-13)=0]
      │    ├── key: (2,11-13)
      │    └── anti-join (hash)
      │         ├── save-table-name: q16_anti_join_4
      │         ├── columns: ps_partkey:1(int!null) ps_suppkey:2(int!null) p_partkey:8(int!null) p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      │         ├── stats: [rows=28797.62, distinct(1)=10657.8, null(1)=0, distinct(2)=9375.8, null(2)=0, distinct(8)=10657.8, null(8)=0, distinct(11)=24.9999, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=8, null(13)=0, distinct(11-13)=9929.3, null(11-13)=0, distinct(2,11-13)=28797.6, null(2,11-13)=0]
      │         ├── key: (2,8)
      │         ├── fd: (8)-->(11-13), (1)==(8), (8)==(1)
      │         ├── inner-join (lookup partsupp)
      │         │    ├── save-table-name: q16_lookup_join_5
      │         │    ├── columns: ps_partkey:1(int!null) ps_suppkey:2(int!null) p_partkey:8(int!null) p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      │         │    ├── key columns: [8] = [1]
      │         │    ├── stats: [rows=42797.83, distinct(1)=10657.8, null(1)=0, distinct(2)=9787.31, null(2)=0, distinct(8)=10657.8, null(8)=0, distinct(11)=24.9999, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=8, null(13)=0]
      │         │    ├── key: (2,8)
      │         │    ├── fd: (8)-->(11-13), (1)==(8), (8)==(1)
      │         │    ├── select
      │         │    │    ├── save-table-name: q16_select_6
      │         │    │    ├── columns: p_partkey:8(int!null) p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      │         │    │    ├── stats: [rows=10658.85, distinct(8)=10657.8, null(8)=0, distinct(11)=24.9999, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=8, null(13)=0, distinct(11,13)=199.999, null(11,13)=0, distinct(11-13)=10639.6, null(11-13)=0]
      │         │    │    │   histogram(11)=  0    407.17    7376.2      0       0         0         2446    429.55
      │         │    │    │                 <--- 'Brand#11' -------- 'Brand#45' --- e'Brand#45\x00' ------ 'Brand#55'
      │         │    │    │   histogram(13)=  0 1332.4 0 1332.4 0 1332.4 0 1332.4 0 1332.4 0 1332.4 0 1332.4 0 1332.4
      │         │    │    │                 <---- 3 ------ 9 ------ 14 ----- 19 ----- 23 ----- 36 ----- 45 ----- 49 -
      │         │    │    ├── key: (8)
      │         │    │    ├── fd: (8)-->(11-13)
      │         │    │    ├── scan part
      │         │    │    │    ├── save-table-name: q16_scan_7
      │         │    │    │    ├── columns: p_partkey:8(int!null) p_brand:11(char!null) p_type:12(varchar!null) p_size:13(int!null)
      │         │    │    │    ├── stats: [rows=200000, distinct(8)=199241, null(8)=0, distinct(11)=25, null(11)=0, distinct(12)=150, null(12)=0, distinct(13)=50, null(13)=0, distinct(11,13)=1250, null(11,13)=0, distinct(11-13)=187500, null(11-13)=0]
      │         │    │    │    │   histogram(8)=  0 3.9982 929.57 3.9982 1135.5 3.9982 923.58 3.9982 1036.5 3.9982 964.56 3.9982 953.56 3.9982 899.59 3.9982 1152.5 3.9982 1118.5 3.9982 1137.5 3.9982  1129.5 3.9982  1136.5 3.9982  983.55 3.9982  983.55 3.9982  1028.5 3.9982  1007.5 3.9982  1036.5 3.9982  884.59 3.9982  985.55 3.9982  970.55 3.9982  1036.5 3.9982  943.57 3.9982  1020.5 3.9982  1001.5 3.9982  1001.5 3.9982  954.56 3.9982  1036.5 3.9982  990.54 3.9982  928.57 3.9982  1010.5 3.9982  892.59 3.9982  960.56 3.9982  1059.5 3.9982  947.56 3.9982  906.58 3.9982  935.57 3.9982  860.6 3.9982  971.55 3.9982  1067.5 3.9982  994.54 3.9982  961.56 3.9982  943.57 3.9982  901.59 3.9982  972.55 3.9982  956.56 3.9982  1106.5 3.9982  1152.5 3.9982  967.55 3.9982  943.57 3.9982  916.58 3.9982  1076.5 3.9982  933.57 3.9982  1108.5 3.9982  1081.5 3.9982  975.55 3.9982  1021.5 3.9982  1034.5 3.9982  905.58 3.9982  902.58 3.9982  966.56 3.9982  1080.5 3.9982  927.57 3.9982  936.57 3.9982  1008.5 3.9982  1033.5 3.9982  903.58 3.9982  944.57 3.9982  908.58 3.9982  1008.5 3.9982  1059.5 3.9982  1079.5 3.9982  911.58 3.9982  1107.5 3.9982  992.54 3.9982  975.55 3.9982  1156.5 3.9982  1042.5 3.9982  1072.5 3.9982  916.58 3.9982  1022.5 3.9982  999.54 3.9982  966.56 3.9982  936.57 3.9982  934.57 3.9982  969.55 3.9982  1136.5 3.9982  997.54 3.9982  991.54 3.9982  1002.5 3.9982  1047.5 3.9982  1059.5 3.9982  972.55 3.9982  918.58 3.9982  959.56 3.9982  1083.5 3.9982  934.57 3.9982  900.59 3.9982  970.55 3.9982  952.56 3.9982  1063.5  3.9982  870.6  3.9982  958.56  3.9982  1029.5  3.9982  943.57  3.9982  872.6  3.9982  972.55  3.9982  1009.5  3.9982  875.6  3.9982  1127.5  3.9982  987.55  3.9982  1156.5  3.9982  971.55  3.9982  1155.5  3.9982  930.57  3.9982  1051.5  3.9982  1044.5  3.9982  867.6  3.9982  898.59  3.9982  926.57  3.9982  965.56  3.9982  1027.5  3.9982  993.54  3.9982  927.57  3.9982  973.55  3.9982  934.57  3.9982  951.56  3.9982  1007.5  3.9982  1124.5  3.9982  936.57  3.9982  1050.5  3.9982  1075.5  3.9982  1028.5  3.9982  872.6  3.9982  960.56  3.9982  1014.5  3.9982  1017.5  3.9982  860.6  3.9982  1039.5  3.9982  1059.5  3.9982  921.58  3.9982  936.57  3.9982  1024.5  3.9982  970.55  3.9982  1047.5  3.9982  917.58  3.9982  948.56  3.9982  978.55  3.9982  993.54  3.9982  1121.5  3.9982  944.57  3.9982  1005.5  3.9982  1037.5  3.9982  1261.4  3.9982  1062.5  3.9982  925.57  3.9982  976.55  3.9982  892.59  3.9982  972.55  3.9982  1135.5  3.9982  1044.5  3.9982  959.56  3.9982  990.54  3.9982  993.54  3.9982  1130.5  3.9982  919.58  3.9982  1025.5  3.9982  1001.5  3.9982  974.55  3.9982  1061.5  3.9982  1166.5  3.9982  1017.5  3.9982  1063.5  3.9982  1188.5  3.9982  964.56  3.9982  1047.5  3.9982  1210.4  3.9982  1087.5  3.9982  1151.5  3.9982  1096.5  3.9982  957.56  3.9982  1073.5  3.9982  925.57  3.9982  1051.5  3.9982  930.57  3.9982  1005.5  3.9982  977.55  3.9982  963.56  3.9982  1005.5  3.9982  954.56  3.9982  1025.5  3.9982  1039.5  3.9982  985.55  3.9982  923.58  3.9982  1087.5  3.9982  958.56  3.9982  1066.5  3.9982  1110.5  3.9982  934.57  3.9982  946.56  3.9982
      │         │    │    │    │                <---- 23 --------- 901 --------- 2150 -------- 3016 -------- 4093 -------- 5038 -------- 5962 -------- 6778 -------- 8056 -------- 9277 -------- 10530 -------- 11769 -------- 13020 -------- 14001 -------- 14982 -------- 16046 -------- 17072 -------- 18149 -------- 18935 -------- 19920 -------- 20876 -------- 21953 -------- 22859 -------- 23908 -------- 24923 -------- 25938 -------- 26865 -------- 27943 -------- 28938 -------- 29813 -------- 30844 -------- 31647 -------- 32585 -------- 33704 -------- 34617 -------- 35448 -------- 36338 ------- 37071 -------- 38029 -------- 39162 -------- 40163 -------- 41103 -------- 42008 -------- 42828 -------- 43789 -------- 44720 -------- 45920 -------- 47197 -------- 48149 -------- 49054 -------- 49906 -------- 51054 -------- 51940 -------- 53144 -------- 54301 -------- 55267 -------- 56318 -------- 57393 -------- 58223 -------- 59046 -------- 59995 -------- 61150 -------- 62024 -------- 62915 -------- 63943 -------- 65015 -------- 65840 -------- 66748 -------- 67584 -------- 68611 -------- 69729 -------- 70883 -------- 71725 -------- 72926 -------- 73924 -------- 74891 -------- 76176 -------- 77264 -------- 78405 -------- 79257 -------- 80310 -------- 81321 -------- 82270 -------- 83162 -------- 84049 -------- 85004 -------- 86255 -------- 87262 -------- 88259 -------- 89276 -------- 90374 -------- 91493 -------- 92454 -------- 93310 -------- 94246 -------- 95407 -------- 96295 -------- 97113 -------- 98069 -------- 98991 -------- 100116 ------- 100871 -------- 101805 -------- 102871 -------- 103776 ------- 104536 -------- 105497 -------- 106526 ------- 107293 -------- 108529 -------- 109518 -------- 110802 -------- 111761 -------- 113044 -------- 113923 -------- 115027 -------- 116119 ------- 116867 -------- 117681 -------- 118553 -------- 119501 -------- 120563 -------- 121563 -------- 122437 -------- 123400 -------- 124288 -------- 125209 -------- 126234 -------- 127465 -------- 128356 -------- 129458 -------- 130604 -------- 131668 ------- 132428 -------- 133365 -------- 134403 -------- 135446 ------- 136179 -------- 137262 -------- 138380 -------- 139242 -------- 140134 -------- 141190 -------- 142146 -------- 143244 -------- 144097 -------- 145011 -------- 145982 -------- 146981 -------- 148207 -------- 149115 -------- 150119 -------- 151183 -------- 152627 -------- 153735 -------- 154585 -------- 155535 -------- 156315 -------- 157258 -------- 158494 -------- 159570 -------- 160487 -------- 161464 -------- 162446 -------- 163673 -------- 164509 -------- 165550 -------- 166548 -------- 167495 -------- 168601 -------- 169889 -------- 170916 -------- 172026 -------- 173351 -------- 174278 -------- 175359 -------- 176720 -------- 177872 -------- 179135 -------- 180304 -------- 181217 -------- 182345 -------- 183194 -------- 184282 -------- 185142 -------- 186147 -------- 187099 -------- 188024 -------- 189029 -------- 189936 -------- 190977 -------- 192044 -------- 193012 -------- 193858 -------- 195011 -------- 195927 -------- 197043 -------- 198236 -------- 199104 -------- 199995
      │         │    │    │    │   histogram(11)=  0     7640     1.843e+05     8060
      │         │    │    │    │                 <--- 'Brand#11' ----------- 'Brand#55'
      │         │    │    │    │   histogram(12)=  0            1360            1.9708e+05           1560
      │         │    │    │    │                 <--- 'ECONOMY ANODIZED BRASS' ------------ 'STANDARD POLISHED TIN'
      │         │    │    │    │   histogram(13)=  0 4240 1.9186e+05 3900
      │         │    │    │    │                 <--- 1 ------------- 50
      │         │    │    │    ├── key: (8)
      │         │    │    │    └── fd: (8)-->(11-13)
      │         │    │    └── filters
      │         │    │         ├── p_brand:11 != 'Brand#45' [type=bool, outer=(11), constraints=(/11: (/NULL - /'Brand#45') [/e'Brand#45\x00' - ]; tight)]
      │         │    │         ├── p_type:12 NOT LIKE 'MEDIUM POLISHED %' [type=bool, outer=(12), constraints=(/12: (/NULL - ])]
      │         │    │         └── p_size:13 IN (3, 9, 14, 19, 23, 36, 45, 49) [type=bool, outer=(13), constraints=(/13: [/3 - /3] [/9 - /9] [/14 - /14] [/19 - /19] [/23 - /23] [/36 - /36] [/45 - /45] [/49 - /49]; tight)]
      │         │    └── filters (true)
      │         ├── select
      │         │    ├── save-table-name: q16_select_8
      │         │    ├── columns: s_suppkey:19(int!null) s_comment:25(varchar!null)
      │         │    ├── stats: [rows=3333.333, distinct(19)=3328.26, null(19)=0, distinct(25)=3333.33, null(25)=0]
      │         │    ├── key: (19)
      │         │    ├── fd: (19)-->(25)
      │         │    ├── scan supplier
      │         │    │    ├── save-table-name: q16_scan_9
      │         │    │    ├── columns: s_suppkey:19(int!null) s_comment:25(varchar!null)
      │         │    │    ├── stats: [rows=10000, distinct(19)=9920, null(19)=0, distinct(25)=9934, null(25)=0]
      │         │    │    │   histogram(19)=  0           0            0  1  49  1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1   49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    49   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50   1    50    1    0           0
      │         │    │    │                 <--- -9223372036854775808 --- 1 ---- 51 ---- 101 ---- 151 ---- 201 ---- 251 ---- 301 ---- 351 ---- 401 ---- 451 ---- 501 ---- 551 ---- 601 ---- 651 ---- 701 ---- 751 ---- 801 ---- 851 ---- 901 ---- 951 ---- 1001 ---- 1051 ---- 1101 ---- 1151 ---- 1201 ---- 1251 ---- 1301 ---- 1351 ---- 1401 ---- 1451 ---- 1501 ---- 1551 ---- 1601 ---- 1651 ---- 1701 ---- 1751 ---- 1801 ---- 1851 ---- 1901 ---- 1951 ---- 2001 ---- 2051 ---- 2101 ---- 2151 ---- 2201 ---- 2251 ---- 2301 ---- 2351 ---- 2401 ---- 2451 ---- 2501 ---- 2551 ---- 2601 ---- 2651 ---- 2701 ---- 2751 ---- 2801 ---- 2851 ---- 2901 ---- 2951 ---- 3001 ---- 3051 ---- 3101 ---- 3151 ---- 3201 ---- 3251 ---- 3301 ---- 3351 ---- 3401 ---- 3451 ---- 3501 ---- 3551 ---- 3601 ---- 3651 ---- 3701 ---- 3751 ---- 3801 ---- 3851 ---- 3901 ---- 3951 ---- 4001 ---- 4051 ---- 4101 ---- 4151 ---- 4201 ---- 4251 ---- 4301 ---- 4351 ---- 4401 ---- 4451 ---- 4501 ---- 4551 ---- 4601 ---- 4651 ---- 4701 ---- 4751 ---- 4801 ---- 4851 ---- 4901 ---- 4951 ---- 5001 ---- 5051 ---- 5101 ---- 5151 ---- 5201 ---- 5251 ---- 5301 ---- 5351 ---- 5401 ---- 5451 ---- 5501 ---- 5551 ---- 5601 ---- 5651 ---- 5701 ---- 5751 ---- 5801 ---- 5851 ---- 5901 ---- 5951 ---- 6001 ---- 6051 ---- 6101 ---- 6151 ---- 6201 ---- 6251 ---- 6301 ---- 6351 ---- 6401 ---- 6451 ---- 6501 ---- 6551 ---- 6601 ---- 6651 ---- 6701 ---- 6751 ---- 6801 ---- 6851 ---- 6901 ---- 6951 ---- 7001 ---- 7051 ---- 7101 ---- 7151 ---- 7201 ---- 7251 ---- 7301 ---- 7351 ---- 7401 ---- 7451 ---- 7501 ---- 7552 ---- 7603 ---- 7654 ---- 7705 ---- 7756 ---- 7807 ---- 7858 ---- 7909 ---- 7960 ---- 8011 ---- 8062 ---- 8113 ---- 8164 ---- 8215 ---- 8266 ---- 8317 ---- 8368 ---- 8419 ---- 8470 ---- 8521 ---- 8572 ---- 8623 ---- 8674 ---- 8725 ---- 8776 ---- 8827 ---- 8878 ---- 8929 ---- 8980 ---- 9031 ---- 9082 ---- 9133 ---- 9184 ---- 9235 ---- 9286 ---- 9337 ---- 9388 ---- 9439 ---- 9490 ---- 9541 ---- 9592 ---- 9643 ---- 9694 ---- 9745 ---- 9796 ---- 9847 ---- 9898 ---- 9949 ---- 10000 --- 9223372036854775807
      │         │    │    │   histogram(25)=  0                     1                      9998                                   1
      │         │    │    │                 <--- ' about the blithely express foxes. bli' ------ 'zzle furiously. bold accounts haggle furiously ironic excuses. fur'
      │         │    │    ├── key: (19)
      │         │    │    └── fd: (19)-->(25)
      │         │    └── filters
      │         │         └── s_comment:25 LIKE '%Customer%Complaints%' [type=bool, outer=(25), constraints=(/25: (/NULL - ])]
      │         └── filters
      │              └── ps_suppkey:2 = s_suppkey:19 [type=bool, outer=(2,19), constraints=(/2: (/NULL - ]; /19: (/NULL - ]), fd=(2)==(19), (19)==(2)]
      └── aggregations
           └── count-rows [as=count:29, type=int]

----Stats for q16_sort_1----
column_names    row_count  distinct_count  null_count
{p_brand}       18314      24              0
{p_size}        18314      8               0
{p_type}        18314      145             0
{supplier_cnt}  18314      15              0
~~~~
column_names    row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{p_brand}       9929.00        1.84           25.00               1.04                0.00            1.00
{p_size}        9929.00        1.84           8.00                1.00                0.00            1.00
{p_type}        9929.00        1.84           150.00              1.03                0.00            1.00
{supplier_cnt}  9929.00        1.84           9929.00             661.93 <==          0.00            1.00

----Stats for q16_group_by_2----
column_names  row_count  distinct_count  null_count
{count}       18314      15              0
{p_brand}     18314      24              0
{p_size}      18314      8               0
{p_type}      18314      145             0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{count}       9929.00        1.84           9929.00             661.93 <==          0.00            1.00
{p_brand}     9929.00        1.84           25.00               1.04                0.00            1.00
{p_size}      9929.00        1.84           8.00                1.00                0.00            1.00
{p_type}      9929.00        1.84           150.00              1.03                0.00            1.00

----Stats for q16_distinct_on_3----
column_names  row_count  distinct_count  null_count
{p_brand}     118250     24              0
{p_size}      118250     8               0
{p_type}      118250     145             0
{ps_suppkey}  118250     9916            0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{p_brand}     28798.00       4.11 <==       25.00               1.04                0.00            1.00
{p_size}      28798.00       4.11 <==       8.00                1.00                0.00            1.00
{p_type}      28798.00       4.11 <==       150.00              1.03                0.00            1.00
{ps_suppkey}  28798.00       4.11 <==       9376.00             1.06                0.00            1.00

----Stats for q16_anti_join_4----
column_names  row_count  distinct_count  null_count
{p_brand}     118274     24              0
{p_partkey}   118274     29433           0
{p_size}      118274     8               0
{p_type}      118274     145             0
{ps_partkey}  118274     29433           0
{ps_suppkey}  118274     9916            0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{p_brand}     28798.00       4.11 <==       25.00               1.04                0.00            1.00
{p_partkey}   28798.00       4.11 <==       10658.00            2.76 <==            0.00            1.00
{p_size}      28798.00       4.11 <==       8.00                1.00                0.00            1.00
{p_type}      28798.00       4.11 <==       150.00              1.03                0.00            1.00
{ps_partkey}  28798.00       4.11 <==       10658.00            2.76 <==            0.00            1.00
{ps_suppkey}  28798.00       4.11 <==       9376.00             1.06                0.00            1.00

----Stats for q16_lookup_join_5----
column_names  row_count  distinct_count  null_count
{p_brand}     118324     24              0
{p_partkey}   118324     29433           0
{p_size}      118324     8               0
{p_type}      118324     145             0
{ps_partkey}  118324     29433           0
{ps_suppkey}  118324     9920            0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{p_brand}     42798.00       2.76 <==       25.00               1.04                0.00            1.00
{p_partkey}   42798.00       2.76 <==       10658.00            2.76 <==            0.00            1.00
{p_size}      42798.00       2.76 <==       8.00                1.00                0.00            1.00
{p_type}      42798.00       2.76 <==       150.00              1.03                0.00            1.00
{ps_partkey}  42798.00       2.76 <==       10658.00            2.76 <==            0.00            1.00
{ps_suppkey}  42798.00       2.76 <==       9787.00             1.01                0.00            1.00

----Stats for q16_select_6----
column_names  row_count  distinct_count  null_count
{p_brand}     29581      24              0
{p_partkey}   29581      29433           0
{p_size}      29581      8               0
{p_type}      29581      145             0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{p_brand}     10659.00       2.78 <==       25.00               1.04                0.00            1.00
{p_partkey}   10659.00       2.78 <==       10658.00            2.76 <==            0.00            1.00
{p_size}      10659.00       2.78 <==       8.00                1.00                0.00            1.00
{p_type}      10659.00       2.78 <==       150.00              1.03                0.00            1.00

----Stats for q16_scan_7----
column_names  row_count  distinct_count  null_count
{p_brand}     200000     25              0
{p_partkey}   200000     199241          0
{p_size}      200000     50              0
{p_type}      200000     150             0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{p_brand}     200000.00      1.00           25.00               1.00                0.00            1.00
{p_partkey}   200000.00      1.00           199241.00           1.00                0.00            1.00
{p_size}      200000.00      1.00           50.00               1.00                0.00            1.00
{p_type}      200000.00      1.00           150.00              1.00                0.00            1.00

----Stats for q16_select_8----
column_names  row_count  distinct_count  null_count
{s_comment}   4          4               0
{s_suppkey}   4          4               0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{s_comment}   3333.00        833.25 <==     3333.00             833.25 <==          0.00            1.00
{s_suppkey}   3333.00        833.25 <==     3328.00             832.00 <==          0.00            1.00

----Stats for q16_scan_9----
column_names  row_count  distinct_count  null_count
{s_comment}   10000      9934            0
{s_suppkey}   10000      9920            0
~~~~
column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{s_comment}   10000.00       1.00           9934.00             1.00                0.00            1.00
{s_suppkey}   10000.00       1.00           9920.00             1.00                0.00            1.00
----
----
