github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/memo/testdata/stats_quality/tpch/q07 (about)

     1  import file=tpch_schema
     2  ----
     3  
     4  import file=tpch_stats
     5  ----
     6  
     7  # --------------------------------------------------
     8  # Q7
     9  # Volume Shipping
    10  # Determines the value of goods shipped between certain nations to help in the
    11  # re-negotiation of shipping contracts.
    12  #
    13  # Finds, for two given nations, the gross discounted revenues derived from
    14  # lineitems in which parts were shipped from a supplier in either nation to a
    15  # customer in the other nation during 1995 and 1996. The query lists the
    16  # supplier nation, the customer nation, the year, and the revenue from shipments
    17  # that took place in that year. The query orders the answer by Supplier nation,
    18  # Customer nation, and year (all ascending).
    19  #
    20  # TODO:
    21  #   1. Join ordering
    22  # --------------------------------------------------
    23  save-tables database=tpch save-tables-prefix=q7
    24  SELECT
    25      supp_nation,
    26      cust_nation,
    27      l_year, sum(volume) AS revenue
    28  FROM (
    29      SELECT
    30          n1.n_name AS supp_nation,
    31          n2.n_name AS cust_nation,
    32          extract(year FROM l_shipdate) AS l_year,
    33          l_extendedprice * (1 - l_discount) AS volume
    34      FROM
    35          supplier,
    36          lineitem,
    37          orders,
    38          customer,
    39          nation n1,
    40          nation n2
    41      WHERE
    42          s_suppkey = l_suppkey
    43          AND o_orderkey = l_orderkey
    44          AND c_custkey = o_custkey
    45          AND s_nationkey = n1.n_nationkey
    46          AND c_nationkey = n2.n_nationkey
    47          AND (
    48              (n1.n_name = 'FRANCE' AND n2.n_name = 'GERMANY')
    49              or (n1.n_name = 'GERMANY' AND n2.n_name = 'FRANCE')
    50          )
    51          AND l_shipdate BETWEEN DATE '1995-01-01' AND DATE '1996-12-31'
    52      ) AS shipping
    53  GROUP BY
    54      supp_nation,
    55      cust_nation,
    56      l_year
    57  ORDER BY
    58      supp_nation,
    59      cust_nation,
    60      l_year;
    61  ----
    62  sort
    63   ├── save-table-name: q7_sort_1
    64   ├── columns: supp_nation:42(char!null) cust_nation:46(char!null) l_year:49(float) revenue:51(float!null)
    65   ├── immutable
    66   ├── stats: [rows=974.320532, distinct(42)=1.33333333, null(42)=0, distinct(46)=1.33333333, null(46)=0, distinct(49)=730.981616, null(49)=0, distinct(51)=974.320532, null(51)=0, distinct(42,46,49)=974.320532, null(42,46,49)=0]
    67   ├── key: (42,46,49)
    68   ├── fd: (42,46,49)-->(51)
    69   ├── ordering: +42,+46,+49
    70   └── group-by
    71        ├── save-table-name: q7_group_by_2
    72        ├── columns: n1.n_name:42(char!null) n2.n_name:46(char!null) l_year:49(float) sum:51(float!null)
    73        ├── grouping columns: n1.n_name:42(char!null) n2.n_name:46(char!null) l_year:49(float)
    74        ├── immutable
    75        ├── stats: [rows=974.320532, distinct(42)=1.33333333, null(42)=0, distinct(46)=1.33333333, null(46)=0, distinct(49)=730.981616, null(49)=0, distinct(51)=974.320532, null(51)=0, distinct(42,46,49)=974.320532, null(42,46,49)=0]
    76        ├── key: (42,46,49)
    77        ├── fd: (42,46,49)-->(51)
    78        ├── project
    79        │    ├── save-table-name: q7_project_3
    80        │    ├── columns: l_year:49(float) volume:50(float!null) n1.n_name:42(char!null) n2.n_name:46(char!null)
    81        │    ├── immutable
    82        │    ├── stats: [rows=7741.78379, distinct(42)=1.33333333, null(42)=0, distinct(46)=1.33333333, null(46)=0, distinct(49)=730.981616, null(49)=0, distinct(50)=7579.92926, null(50)=0, distinct(42,46,49)=974.320532, null(42,46,49)=0]
    83        │    ├── inner-join (hash)
    84        │    │    ├── save-table-name: q7_inner_join_4
    85        │    │    ├── columns: s_suppkey:1(int!null) s_nationkey:4(int!null) l_orderkey:8(int!null) l_suppkey:10(int!null) l_extendedprice:13(float!null) l_discount:14(float!null) l_shipdate:18(date!null) o_orderkey:24(int!null) o_custkey:25(int!null) c_custkey:33(int!null) c_nationkey:36(int!null) n1.n_nationkey:41(int!null) n1.n_name:42(char!null) n2.n_nationkey:45(int!null) n2.n_name:46(char!null)
    86        │    │    ├── stats: [rows=7741.78379, distinct(1)=7741.78379, null(1)=0, distinct(4)=1.29975178, null(4)=0, distinct(8)=7488.03308, null(8)=0, distinct(10)=7741.78379, null(10)=0, distinct(13)=7569.91685, null(13)=0, distinct(14)=11, null(14)=0, distinct(18)=730.981616, null(18)=0, distinct(24)=7488.03308, null(24)=0, distinct(25)=4946.3467, null(25)=0, distinct(33)=4946.3467, null(33)=0, distinct(36)=1.29975178, null(36)=0, distinct(41)=1.29975178, null(41)=0, distinct(42)=1.33333333, null(42)=0, distinct(45)=1.29975178, null(45)=0, distinct(46)=1.33333333, null(46)=0, distinct(13,14)=7579.92926, null(13,14)=0, distinct(18,42,46)=974.320532, null(18,42,46)=0]
    87        │    │    ├── fd: (1)-->(4), (24)-->(25), (33)-->(36), (41)-->(42), (45)-->(46), (36)==(45), (45)==(36), (25)==(33), (33)==(25), (8)==(24), (24)==(8), (1)==(10), (10)==(1), (4)==(41), (41)==(4)
    88        │    │    ├── inner-join (lookup lineitem)
    89        │    │    │    ├── save-table-name: q7_lookup_join_5
    90        │    │    │    ├── columns: l_orderkey:8(int!null) l_suppkey:10(int!null) l_extendedprice:13(float!null) l_discount:14(float!null) l_shipdate:18(date!null) o_orderkey:24(int!null) o_custkey:25(int!null) c_custkey:33(int!null) c_nationkey:36(int!null) n1.n_nationkey:41(int!null) n1.n_name:42(char!null) n2.n_nationkey:45(int!null) n2.n_name:46(char!null)
    91        │    │    │    ├── key columns: [24] = [8]
    92        │    │    │    ├── stats: [rows=191996.238, distinct(8)=115496.88, null(8)=0, distinct(10)=9919.99996, null(10)=0, distinct(13)=171759.779, null(13)=0, distinct(14)=11, null(14)=0, distinct(18)=731, null(18)=0, distinct(24)=115496.88, null(24)=0, distinct(25)=7944.47548, null(25)=0, distinct(33)=7944.47548, null(33)=0, distinct(36)=1.29975178, null(36)=0, distinct(41)=1.29975178, null(41)=0, distinct(42)=1.33333333, null(42)=0, distinct(45)=1.29975178, null(45)=0, distinct(46)=1.33333333, null(46)=0, distinct(13,14)=182544.701, null(13,14)=0, distinct(18,42,46)=974.666667, null(18,42,46)=0]
    93        │    │    │    ├── fd: (24)-->(25), (33)-->(36), (41)-->(42), (45)-->(46), (36)==(45), (45)==(36), (25)==(33), (33)==(25), (8)==(24), (24)==(8)
    94        │    │    │    ├── inner-join (lookup orders@o_ck)
    95        │    │    │    │    ├── save-table-name: q7_lookup_join_6
    96        │    │    │    │    ├── columns: o_orderkey:24(int!null) o_custkey:25(int!null) c_custkey:33(int!null) c_nationkey:36(int!null) n1.n_nationkey:41(int!null) n1.n_name:42(char!null) n2.n_nationkey:45(int!null) n2.n_name:46(char!null)
    97        │    │    │    │    ├── key columns: [33] = [25]
    98        │    │    │    │    ├── stats: [rows=120185.085, distinct(24)=115496.88, null(24)=0, distinct(25)=7944.47548, null(25)=0, distinct(33)=7944.47548, null(33)=0, distinct(36)=1.29975178, null(36)=0, distinct(41)=1.29975178, null(41)=0, distinct(42)=1.33333333, null(42)=0, distinct(45)=1.29975178, null(45)=0, distinct(46)=1.33333333, null(46)=0, distinct(42,46)=1.33333333, null(42,46)=0]
    99        │    │    │    │    ├── key: (24,41)
   100        │    │    │    │    ├── fd: (24)-->(25), (33)-->(36), (41)-->(42), (45)-->(46), (36)==(45), (45)==(36), (25)==(33), (33)==(25)
   101        │    │    │    │    ├── inner-join (lookup customer@c_nk)
   102        │    │    │    │    │    ├── save-table-name: q7_lookup_join_7
   103        │    │    │    │    │    ├── columns: c_custkey:33(int!null) c_nationkey:36(int!null) n1.n_nationkey:41(int!null) n1.n_name:42(char!null) n2.n_nationkey:45(int!null) n2.n_name:46(char!null)
   104        │    │    │    │    │    ├── key columns: [45] = [36]
   105        │    │    │    │    │    ├── stats: [rows=8000, distinct(33)=7944.47548, null(33)=0, distinct(36)=1.29975178, null(36)=0, distinct(41)=1.29975178, null(41)=0, distinct(42)=1.33333333, null(42)=0, distinct(45)=1.29975178, null(45)=0, distinct(46)=1.33333333, null(46)=0, distinct(42,46)=1.33333333, null(42,46)=0]
   106        │    │    │    │    │    ├── key: (33,41)
   107        │    │    │    │    │    ├── fd: (33)-->(36), (41)-->(42), (45)-->(46), (36)==(45), (45)==(36)
   108        │    │    │    │    │    ├── inner-join (cross)
   109        │    │    │    │    │    │    ├── save-table-name: q7_inner_join_8
   110        │    │    │    │    │    │    ├── columns: n1.n_nationkey:41(int!null) n1.n_name:42(char!null) n2.n_nationkey:45(int!null) n2.n_name:46(char!null)
   111        │    │    │    │    │    │    ├── stats: [rows=1.33333333, distinct(41)=1.29975178, null(41)=0, distinct(42)=1.33333333, null(42)=0, distinct(45)=1.29975178, null(45)=0, distinct(46)=1.33333333, null(46)=0, distinct(42,46)=1.33333333, null(42,46)=0]
   112        │    │    │    │    │    │    ├── key: (41,45)
   113        │    │    │    │    │    │    ├── fd: (41)-->(42), (45)-->(46)
   114        │    │    │    │    │    │    ├── scan n1
   115        │    │    │    │    │    │    │    ├── save-table-name: q7_scan_9
   116        │    │    │    │    │    │    │    ├── columns: n1.n_nationkey:41(int!null) n1.n_name:42(char!null)
   117        │    │    │    │    │    │    │    ├── stats: [rows=25, distinct(41)=25, null(41)=0, distinct(42)=25, null(42)=0]
   118        │    │    │    │    │    │    │    │   histogram(41)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1
   119        │    │    │    │    │    │    │    │                 <--- 0 --- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13 --- 14 --- 15 --- 16 --- 17 --- 18 --- 19 --- 20 --- 21 --- 22 --- 23 --- 24
   120        │    │    │    │    │    │    │    ├── key: (41)
   121        │    │    │    │    │    │    │    └── fd: (41)-->(42)
   122        │    │    │    │    │    │    ├── scan n2
   123        │    │    │    │    │    │    │    ├── save-table-name: q7_scan_10
   124        │    │    │    │    │    │    │    ├── columns: n2.n_nationkey:45(int!null) n2.n_name:46(char!null)
   125        │    │    │    │    │    │    │    ├── stats: [rows=25, distinct(45)=25, null(45)=0, distinct(46)=25, null(46)=0]
   126        │    │    │    │    │    │    │    │   histogram(45)=  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1   0  1
   127        │    │    │    │    │    │    │    │                 <--- 0 --- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13 --- 14 --- 15 --- 16 --- 17 --- 18 --- 19 --- 20 --- 21 --- 22 --- 23 --- 24
   128        │    │    │    │    │    │    │    ├── key: (45)
   129        │    │    │    │    │    │    │    └── fd: (45)-->(46)
   130        │    │    │    │    │    │    └── filters
   131        │    │    │    │    │    │         └── ((n1.n_name:42 = 'FRANCE') AND (n2.n_name:46 = 'GERMANY')) OR ((n1.n_name:42 = 'GERMANY') AND (n2.n_name:46 = 'FRANCE')) [type=bool, outer=(42,46), constraints=(/42: [/'FRANCE' - /'FRANCE'] [/'GERMANY' - /'GERMANY']; /46: [/'FRANCE' - /'FRANCE'] [/'GERMANY' - /'GERMANY'])]
   132        │    │    │    │    │    └── filters (true)
   133        │    │    │    │    └── filters (true)
   134        │    │    │    └── filters
   135        │    │    │         └── (l_shipdate:18 >= '1995-01-01') AND (l_shipdate:18 <= '1996-12-31') [type=bool, outer=(18), constraints=(/18: [/'1995-01-01' - /'1996-12-31']; tight)]
   136        │    │    ├── scan supplier@s_nk
   137        │    │    │    ├── save-table-name: q7_scan_11
   138        │    │    │    ├── columns: s_suppkey:1(int!null) s_nationkey:4(int!null)
   139        │    │    │    ├── stats: [rows=10000, distinct(1)=9920, null(1)=0, distinct(4)=25, null(4)=0]
   140        │    │    │    │   histogram(1)=  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
   141        │    │    │    │                <--- 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
   142        │    │    │    │   histogram(4)=  0 420 0 413 0 397 0 412 0 415 0 380 0 402 0 396 0 415 0 405 0 393  0 438  0 377  0 362  0 376  0 373  0 406  0 421  0 407  0 398  0 411  0 399  0 401  0 390  0 393
   143        │    │    │    │                <--- 0 --- 1 --- 2 --- 3 --- 4 --- 5 --- 6 --- 7 --- 8 --- 9 --- 10 --- 11 --- 12 --- 13 --- 14 --- 15 --- 16 --- 17 --- 18 --- 19 --- 20 --- 21 --- 22 --- 23 --- 24
   144        │    │    │    ├── key: (1)
   145        │    │    │    └── fd: (1)-->(4)
   146        │    │    └── filters
   147        │    │         ├── s_suppkey:1 = l_suppkey:10 [type=bool, outer=(1,10), constraints=(/1: (/NULL - ]; /10: (/NULL - ]), fd=(1)==(10), (10)==(1)]
   148        │    │         └── s_nationkey:4 = n1.n_nationkey:41 [type=bool, outer=(4,41), constraints=(/4: (/NULL - ]; /41: (/NULL - ]), fd=(4)==(41), (41)==(4)]
   149        │    └── projections
   150        │         ├── extract('year', l_shipdate:18) [as=l_year:49, type=float, outer=(18), immutable]
   151        │         └── l_extendedprice:13 * (1.0 - l_discount:14) [as=volume:50, type=float, outer=(13,14)]
   152        └── aggregations
   153             └── sum [as=sum:51, type=float, outer=(50)]
   154                  └── volume:50 [type=float]
   155  
   156  stats table=q7_sort_1
   157  ----
   158  column_names   row_count  distinct_count  null_count
   159  {cust_nation}  4          2               0
   160  {l_year}       4          2               0
   161  {revenue}      4          4               0
   162  {supp_nation}  4          2               0
   163  ~~~~
   164  column_names   row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   165  {cust_nation}  974.00         243.50 <==     1.00                2.00 <==            0.00            1.00
   166  {l_year}       974.00         243.50 <==     731.00              365.50 <==          0.00            1.00
   167  {revenue}      974.00         243.50 <==     974.00              243.50 <==          0.00            1.00
   168  {supp_nation}  974.00         243.50 <==     1.00                2.00 <==            0.00            1.00
   169  
   170  stats table=q7_group_by_2
   171  ----
   172  column_names  row_count  distinct_count  null_count
   173  {l_year}      4          2               0
   174  {n_name_1}    4          2               0
   175  {n_name}      4          2               0
   176  {sum}         4          4               0
   177  ~~~~
   178  column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   179  {l_year}      974.00         243.50 <==     731.00              365.50 <==          0.00            1.00
   180  {n_name}      974.00         243.50 <==     1.00                2.00 <==            0.00            1.00
   181  {n_name_1}    974.00         243.50 <==     1.00                2.00 <==            0.00            1.00
   182  {sum}         974.00         243.50 <==     974.00              243.50 <==          0.00            1.00
   183  
   184  stats table=q7_project_3
   185  ----
   186  column_names  row_count  distinct_count  null_count
   187  {l_year}      5924       2               0
   188  {n_name_1}    5924       2               0
   189  {n_name}      5924       2               0
   190  {volume}      5924       5904            0
   191  ~~~~
   192  column_names  row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   193  {l_year}      7742.00        1.31           731.00              365.50 <==          0.00            1.00
   194  {n_name}      7742.00        1.31           1.00                2.00 <==            0.00            1.00
   195  {n_name_1}    7742.00        1.31           1.00                2.00 <==            0.00            1.00
   196  {volume}      7742.00        1.31           7580.00             1.28                0.00            1.00
   197  
   198  stats table=q7_inner_join_4
   199  ----
   200  column_names       row_count  distinct_count  null_count
   201  {c_custkey}        5924       3902            0
   202  {c_nationkey}      5924       2               0
   203  {l_discount}       5924       11              0
   204  {l_extendedprice}  5924       5876            0
   205  {l_orderkey}       5924       5445            0
   206  {l_shipdate}       5924       731             0
   207  {l_suppkey}        5924       796             0
   208  {n_name_1}         5924       2               0
   209  {n_name}           5924       2               0
   210  {n_nationkey_1}    5924       2               0
   211  {n_nationkey}      5924       2               0
   212  {o_custkey}        5924       3902            0
   213  {o_orderkey}       5924       5445            0
   214  {s_nationkey}      5924       2               0
   215  {s_suppkey}        5924       796             0
   216  ~~~~
   217  column_names       row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   218  {c_custkey}        7742.00        1.31           4946.00             1.27                0.00            1.00
   219  {c_nationkey}      7742.00        1.31           1.00                2.00 <==            0.00            1.00
   220  {l_discount}       7742.00        1.31           11.00               1.00                0.00            1.00
   221  {l_extendedprice}  7742.00        1.31           7570.00             1.29                0.00            1.00
   222  {l_orderkey}       7742.00        1.31           7488.00             1.38                0.00            1.00
   223  {l_shipdate}       7742.00        1.31           731.00              1.00                0.00            1.00
   224  {l_suppkey}        7742.00        1.31           7742.00             9.73 <==            0.00            1.00
   225  {n_name}           7742.00        1.31           1.00                2.00 <==            0.00            1.00
   226  {n_name_1}         7742.00        1.31           1.00                2.00 <==            0.00            1.00
   227  {n_nationkey}      7742.00        1.31           1.00                2.00 <==            0.00            1.00
   228  {n_nationkey_1}    7742.00        1.31           1.00                2.00 <==            0.00            1.00
   229  {o_custkey}        7742.00        1.31           4946.00             1.27                0.00            1.00
   230  {o_orderkey}       7742.00        1.31           7488.00             1.38                0.00            1.00
   231  {s_nationkey}      7742.00        1.31           1.00                2.00 <==            0.00            1.00
   232  {s_suppkey}        7742.00        1.31           7742.00             9.73 <==            0.00            1.00
   233  
   234  stats table=q7_lookup_join_5
   235  ----
   236  column_names       row_count  distinct_count  null_count
   237  {c_custkey}        148370     7980            0
   238  {c_nationkey}      148370     2               0
   239  {l_discount}       148370     11              0
   240  {l_extendedprice}  148370     135829          0
   241  {l_orderkey}       148370     39757           0
   242  {l_shipdate}       148370     731             0
   243  {l_suppkey}        148370     9920            0
   244  {n_name_1}         148370     2               0
   245  {n_name}           148370     2               0
   246  {n_nationkey_1}    148370     2               0
   247  {n_nationkey}      148370     2               0
   248  {o_custkey}        148370     7980            0
   249  {o_orderkey}       148370     39757           0
   250  ~~~~
   251  column_names       row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   252  {c_custkey}        191996.00      1.29           7944.00             1.00                0.00            1.00
   253  {c_nationkey}      191996.00      1.29           1.00                2.00 <==            0.00            1.00
   254  {l_discount}       191996.00      1.29           11.00               1.00                0.00            1.00
   255  {l_extendedprice}  191996.00      1.29           171760.00           1.26                0.00            1.00
   256  {l_orderkey}       191996.00      1.29           115497.00           2.91 <==            0.00            1.00
   257  {l_shipdate}       191996.00      1.29           731.00              1.00                0.00            1.00
   258  {l_suppkey}        191996.00      1.29           9920.00             1.00                0.00            1.00
   259  {n_name}           191996.00      1.29           1.00                2.00 <==            0.00            1.00
   260  {n_name_1}         191996.00      1.29           1.00                2.00 <==            0.00            1.00
   261  {n_nationkey}      191996.00      1.29           1.00                2.00 <==            0.00            1.00
   262  {n_nationkey_1}    191996.00      1.29           1.00                2.00 <==            0.00            1.00
   263  {o_custkey}        191996.00      1.29           7944.00             1.00                0.00            1.00
   264  {o_orderkey}       191996.00      1.29           115497.00           2.91 <==            0.00            1.00
   265  
   266  stats table=q7_lookup_join_6
   267  ----
   268  column_names     row_count  distinct_count  null_count
   269  {c_custkey}      121324     8132            0
   270  {c_nationkey}    121324     2               0
   271  {n_name_1}       121324     2               0
   272  {n_name}         121324     2               0
   273  {n_nationkey_1}  121324     2               0
   274  {n_nationkey}    121324     2               0
   275  {o_custkey}      121324     8132            0
   276  {o_orderkey}     121324     120984          0
   277  ~~~~
   278  column_names     row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   279  {c_custkey}      120185.00      1.01           7944.00             1.02                0.00            1.00
   280  {c_nationkey}    120185.00      1.01           1.00                2.00 <==            0.00            1.00
   281  {n_name}         120185.00      1.01           1.00                2.00 <==            0.00            1.00
   282  {n_name_1}       120185.00      1.01           1.00                2.00 <==            0.00            1.00
   283  {n_nationkey}    120185.00      1.01           1.00                2.00 <==            0.00            1.00
   284  {n_nationkey_1}  120185.00      1.01           1.00                2.00 <==            0.00            1.00
   285  {o_custkey}      120185.00      1.01           7944.00             1.02                0.00            1.00
   286  {o_orderkey}     120185.00      1.01           115497.00           1.05                0.00            1.00
   287  
   288  stats table=q7_lookup_join_7
   289  ----
   290  column_names     row_count  distinct_count  null_count
   291  {c_custkey}      12008      12045           0
   292  {c_nationkey}    12008      2               0
   293  {n_name_1}       12008      2               0
   294  {n_name}         12008      2               0
   295  {n_nationkey_1}  12008      2               0
   296  {n_nationkey}    12008      2               0
   297  ~~~~
   298  column_names     row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   299  {c_custkey}      8000.00        1.50           7944.00             1.52                0.00            1.00
   300  {c_nationkey}    8000.00        1.50           1.00                2.00 <==            0.00            1.00
   301  {n_name}         8000.00        1.50           1.00                2.00 <==            0.00            1.00
   302  {n_name_1}       8000.00        1.50           1.00                2.00 <==            0.00            1.00
   303  {n_nationkey}    8000.00        1.50           1.00                2.00 <==            0.00            1.00
   304  {n_nationkey_1}  8000.00        1.50           1.00                2.00 <==            0.00            1.00
   305  
   306  stats table=q7_inner_join_8
   307  ----
   308  column_names     row_count  distinct_count  null_count
   309  {n_name_1}       2          2               0
   310  {n_name}         2          2               0
   311  {n_nationkey_1}  2          2               0
   312  {n_nationkey}    2          2               0
   313  ~~~~
   314  column_names     row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   315  {n_name}         1.00           2.00 <==       1.00                2.00 <==            0.00            1.00
   316  {n_name_1}       1.00           2.00 <==       1.00                2.00 <==            0.00            1.00
   317  {n_nationkey}    1.00           2.00 <==       1.00                2.00 <==            0.00            1.00
   318  {n_nationkey_1}  1.00           2.00 <==       1.00                2.00 <==            0.00            1.00
   319  
   320  stats table=q7_scan_9
   321  ----
   322  column_names   row_count  distinct_count  null_count
   323  {n_name}       25         25              0
   324  {n_nationkey}  25         25              0
   325  ~~~~
   326  column_names   row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   327  {n_name}       25.00          1.00           25.00               1.00                0.00            1.00
   328  {n_nationkey}  25.00          1.00           25.00               1.00                0.00            1.00
   329  
   330  stats table=q7_scan_10
   331  ----
   332  column_names   row_count  distinct_count  null_count
   333  {n_name}       25         25              0
   334  {n_nationkey}  25         25              0
   335  ~~~~
   336  column_names   row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   337  {n_name}       25.00          1.00           25.00               1.00                0.00            1.00
   338  {n_nationkey}  25.00          1.00           25.00               1.00                0.00            1.00
   339  
   340  stats table=q7_scan_11
   341  ----
   342  column_names   row_count  distinct_count  null_count
   343  {s_nationkey}  10000      25              0
   344  {s_suppkey}    10000      9920            0
   345  ~~~~
   346  column_names   row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
   347  {s_nationkey}  10000.00       1.00           25.00               1.00                0.00            1.00
   348  {s_suppkey}    10000.00       1.00           9920.00             1.00                0.00            1.00