import file=tpch_schema
----

import file=tpch_stats
----

# --------------------------------------------------
# Q1
# Pricing Summary Report
# Reports the amount of business that was billed, shipped, and returned.
#
# Provides a summary pricing report for all lineitems shipped as of a given
# date. The date is within 60 - 120 days of the greatest ship date contained in
# the database. The query lists totals for extended price, discounted extended
# price, discounted extended price plus tax, average quantity, average extended
# price, and average discount. These aggregates are grouped by RETURNFLAG and
# LINESTATUS, and listed in ascending order of RETURNFLAG and LINESTATUS. A
# count of the number of lineitems in each group is included.
# --------------------------------------------------
stats-quality database=tpch set=save_tables_prefix=q1
SELECT
    l_returnflag,
    l_linestatus,
    sum(l_quantity) AS sum_qty,
    sum(l_extendedprice) AS sum_base_price,
    sum(l_extendedprice * (1 - l_discount)) AS sum_disc_price,
    sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) AS sum_charge,
    avg(l_quantity) AS avg_qty,
    avg(l_extendedprice) AS avg_price,
    avg(l_discount) AS avg_disc,
    count(*) AS count_order
FROM
    lineitem
WHERE
    l_shipdate <= DATE '1998-12-01' - INTERVAL '90' DAY
GROUP BY
    l_returnflag,
    l_linestatus
ORDER BY
    l_returnflag,
    l_linestatus;
----
----
sort
 ├── save-table-name: q1_sort_1
 ├── columns: l_returnflag:9(char!null) l_linestatus:10(char!null) sum_qty:19(float!null) sum_base_price:20(float!null) sum_disc_price:22(float!null) sum_charge:24(float!null) avg_qty:25(float!null) avg_price:26(float!null) avg_disc:27(float!null) count_order:28(int!null)
 ├── immutable
 ├── stats: [rows=6, distinct(9)=3, null(9)=0, distinct(10)=2, null(10)=0, distinct(19)=6, null(19)=0, distinct(20)=6, null(20)=0, distinct(22)=6, null(22)=0, distinct(24)=6, null(24)=0, distinct(25)=6, null(25)=0, distinct(26)=6, null(26)=0, distinct(27)=6, null(27)=0, distinct(28)=6, null(28)=0, distinct(9,10)=6, null(9,10)=0]
 ├── key: (9,10)
 ├── fd: (9,10)-->(19,20,22,24-28)
 ├── ordering: +9,+10
 └── group-by (hash)
      ├── save-table-name: q1_group_by_2
      ├── columns: l_returnflag:9(char!null) l_linestatus:10(char!null) sum:19(float!null) sum:20(float!null) sum:22(float!null) sum:24(float!null) avg:25(float!null) avg:26(float!null) avg:27(float!null) count_rows:28(int!null)
      ├── grouping columns: l_returnflag:9(char!null) l_linestatus:10(char!null)
      ├── immutable
      ├── stats: [rows=6, distinct(9)=3, null(9)=0, distinct(10)=2, null(10)=0, distinct(19)=6, null(19)=0, distinct(20)=6, null(20)=0, distinct(22)=6, null(22)=0, distinct(24)=6, null(24)=0, distinct(25)=6, null(25)=0, distinct(26)=6, null(26)=0, distinct(27)=6, null(27)=0, distinct(28)=6, null(28)=0, distinct(9,10)=6, null(9,10)=0]
      ├── key: (9,10)
      ├── fd: (9,10)-->(19,20,22,24-28)
      ├── project
      │    ├── save-table-name: q1_project_3
      │    ├── columns: column21:21(float!null) column23:23(float!null) l_quantity:5(float!null) l_extendedprice:6(float!null) l_discount:7(float!null) l_returnflag:9(char!null) l_linestatus:10(char!null)
      │    ├── immutable
      │    ├── stats: [rows=5915479, distinct(5)=50, null(5)=0, distinct(6)=925955, null(6)=0, distinct(7)=11, null(7)=0, distinct(9)=3, null(9)=0, distinct(10)=2, null(10)=0, distinct(21)=5.91548e+06, null(21)=0, distinct(23)=5.91548e+06, null(23)=0, distinct(9,10)=6, null(9,10)=0]
      │    ├── fd: (6,7)-->(21)
      │    ├── select
      │    │    ├── save-table-name: q1_select_4
      │    │    ├── columns: l_quantity:5(float!null) l_extendedprice:6(float!null) l_discount:7(float!null) l_tax:8(float!null) l_returnflag:9(char!null) l_linestatus:10(char!null) l_shipdate:11(date!null)
      │    │    ├── stats: [rows=5915479, distinct(5)=50, null(5)=0, distinct(6)=925955, null(6)=0, distinct(7)=11, null(7)=0, distinct(8)=9, null(8)=0, distinct(9)=3, null(9)=0, distinct(10)=2, null(10)=0, distinct(11)=2438, null(11)=0, distinct(6,7)=5.91548e+06, null(6,7)=0, distinct(9,10)=6, null(9,10)=0, distinct(6-8)=5.91548e+06, null(6-8)=0]
      │    │    │   histogram(11)=  0       0       4      600       29406      600       28806      2400      28206      2400      28206      1800      28806      1200      28206      2400      26405      3601      27606      3601      28206      2400      28806      3001      28206      2400      27606      2400      29406      1800      29406      3601      28806      1800      27606      4201      27005      3001      25205      4801      25805      4801      27005      4201      28206      1800      26405      3601      26405      3601      23405      7201      29406      2400      26405      3601      28206      2400      27005      3601      28206      3001      29406      1800      25805      4801      28806      3001      28806      1800      29406      1800      27005      4201      29406      4201      27606      2400      28206      3601      28806      1800      26405      3001      27606      3601      24605      4801      27005      5401      28206      2400      28806      1200      28206      4201      27005      2400      27606      3601      27606      2400      28206      2400      28206      1200      28806      3001      28206      1200      25805      6001      28806      1800      27606      4201      27005      5401      28806      3001      27606      2400      24005      5401      24605      5401      28206      3601      26405      3001      27005      2400      28806      3601      28206      1800      28806      2400      28806      1800      28206      1800      27606      3601      28206      3001      26405      3001      28206      1200      28206      2400      28806      1200      27606      3001      24605      5401      28806      1800      25805      3601      27005      2400      28806      1800      28806      600       28806      600       27606      3601      28206      3001      27005      3601      27606      2400      26405      5401      28806      1800      28206      4201      26405      6601      27606      2400      27005      3601      28806      3601      28806      3001      28206      3001      27005      3001      28206      1800      28206      4801      25205      5401      27005      4201      24605      5401      28806      3601      24605      6001      26405      3001      28806      2400      28806      1800      28206      1800      28806      4201      28806      1800      28806      3601      28206      4201      28206      3001      28206      1200      28206      600       27606      3601      25805      3001      25805      3001      27606      2400      26405      3001      25805      4801      27005      1800      28206      3601      28206      1200      25805      3601      27005      4201      28206      3601      27606      3001      26405      3601      24605      4201      24605      4201      27606      2400      25805      3001      28206      2400      28206      4201      27005      3001      25205      3601      26405      2400      27005      3601      25805      3601      27606      1200      25805      3001      27005      3001      26405      2400      28206      3601      28206      2400      27005      4201      27606      1800      27606      3001      24605      4801      28206      3001      28206      3001      27606      2400      26405      3601      27005      2400      27005      1800      26405      3001      25205      4201      25205      3601      27606      3601      27005      1800      25205      3001      26405      3601      25205      3001      26405      1800      25805      3001      25205      3601      23405      5401      27606      2400      27005      3001      25805      2400      27005      2400      25205      4201      27606      5401      24005      4201      26405      3001      24005      4201      27005      1800      26405      1200      27005      3601      26405      3601      26405      1800      27005      2400      27005      3001      24605      3001      24005      3601      27005      2400      26405      2400      25205      2400      25805      1800      25805      3001      24605      2400      24605      2400      25805      3001      25805      1800      19332     1757.5
      │    │    │                 <--- '-infinity' --- '1992-01-04' ------- '1992-02-26' ------- '1992-03-21' ------- '1992-04-04' ------- '1992-04-17' ------- '1992-05-04' ------- '1992-05-17' ------- '1992-05-29' ------- '1992-06-09' ------- '1992-06-22' ------- '1992-07-06' ------- '1992-07-19' ------- '1992-08-01' ------- '1992-08-13' ------- '1992-08-26' ------- '1992-09-07' ------- '1992-09-19' ------- '1992-10-01' ------- '1992-10-14' ------- '1992-10-26' ------- '1992-11-06' ------- '1992-11-21' ------- '1992-12-04' ------- '1992-12-15' ------- '1992-12-24' ------- '1993-01-06' ------- '1993-01-18' ------- '1993-01-31' ------- '1993-02-13' ------- '1993-02-25' ------- '1993-03-09' ------- '1993-03-19' ------- '1993-03-31' ------- '1993-04-11' ------- '1993-04-27' ------- '1993-05-06' ------- '1993-05-18' ------- '1993-06-01' ------- '1993-06-13' ------- '1993-06-25' ------- '1993-07-08' ------- '1993-07-21' ------- '1993-08-03' ------- '1993-08-16' ------- '1993-08-29' ------- '1993-09-10' ------- '1993-09-19' ------- '1993-10-02' ------- '1993-10-13' ------- '1993-10-25' ------- '1993-11-06' ------- '1993-11-18' ------- '1993-11-29' ------- '1993-12-12' ------- '1993-12-24' ------- '1994-01-06' ------- '1994-01-20' ------- '1994-02-01' ------- '1994-02-14' ------- '1994-02-25' ------- '1994-03-11' ------- '1994-03-24' ------- '1994-04-07' ------- '1994-04-19' ------- '1994-05-03' ------- '1994-05-14' ------- '1994-05-24' ------- '1994-06-04' ------- '1994-06-14' ------- '1994-06-26' ------- '1994-07-06' ------- '1994-07-17' ------- '1994-08-01' ------- '1994-08-11' ------- '1994-08-25' ------- '1994-09-05' ------- '1994-09-16' ------- '1994-09-26' ------- '1994-10-07' ------- '1994-10-17' ------- '1994-10-27' ------- '1994-11-09' ------- '1994-11-22' ------- '1994-12-04' ------- '1994-12-16' ------- '1995-01-01' ------- '1995-01-14' ------- '1995-01-26' ------- '1995-02-06' ------- '1995-02-19' ------- '1995-03-03' ------- '1995-03-17' ------- '1995-04-01' ------- '1995-04-13' ------- '1995-04-26' ------- '1995-05-12' ------- '1995-05-25' ------- '1995-06-06' ------- '1995-06-19' ------- '1995-07-02' ------- '1995-07-12' ------- '1995-07-27' ------- '1995-08-08' ------- '1995-08-20' ------- '1995-08-31' ------- '1995-09-11' ------- '1995-09-23' ------- '1995-10-07' ------- '1995-10-18' ------- '1995-11-01' ------- '1995-11-13' ------- '1995-11-26' ------- '1995-12-09' ------- '1995-12-22' ------- '1996-01-02' ------- '1996-01-14' ------- '1996-01-25' ------- '1996-02-07' ------- '1996-02-18' ------- '1996-02-28' ------- '1996-03-12' ------- '1996-03-22' ------- '1996-04-01' ------- '1996-04-13' ------- '1996-04-23' ------- '1996-05-04' ------- '1996-05-18' ------- '1996-05-30' ------- '1996-06-12' ------- '1996-06-24' ------- '1996-07-05' ------- '1996-07-19' ------- '1996-07-31' ------- '1996-08-10' ------- '1996-08-24' ------- '1996-09-07' ------- '1996-09-20' ------- '1996-10-02' ------- '1996-10-14' ------- '1996-10-24' ------- '1996-11-05' ------- '1996-11-20' ------- '1996-12-01' ------- '1996-12-13' ------- '1996-12-25' ------- '1997-01-07' ------- '1997-01-19' ------- '1997-02-02' ------- '1997-02-13' ------- '1997-02-24' ------- '1997-03-08' ------- '1997-03-21' ------- '1997-04-01' ------- '1997-04-14' ------- '1997-04-26' ------- '1997-05-09' ------- '1997-05-18' ------- '1997-05-31' ------- '1997-06-13' ------- '1997-06-27' ------- '1997-07-09' ------- '1997-07-22' ------- '1997-07-31' ------- '1997-08-11' ------- '1997-08-25' ------- '1997-09-05' ------- '1997-09-17' ------- '1997-09-29' ------- '1997-10-10' ------- '1997-10-26' ------- '1997-11-07' ------- '1997-11-18' ------- '1997-12-03' ------- '1997-12-15' ------- '1997-12-27' ------- '1998-01-11' ------- '1998-01-24' ------- '1998-02-02' ------- '1998-02-14' ------- '1998-03-01' ------- '1998-03-10' ------- '1998-03-20' ------- '1998-04-02' ------- '1998-04-14' ------- '1998-04-26' ------- '1998-05-09' ------- '1998-05-18' ------- '1998-05-27' ------- '1998-06-06' ------- '1998-06-18' ------- '1998-06-29' ------- '1998-07-10' ------- '1998-07-22' ------- '1998-08-01' ------- '1998-08-10' ------- '1998-08-21' ------- '1998-09-02'
      │    │    ├── scan lineitem
      │    │    │    ├── save-table-name: q1_scan_5
      │    │    │    ├── columns: l_quantity:5(float!null) l_extendedprice:6(float!null) l_discount:7(float!null) l_tax:8(float!null) l_returnflag:9(char!null) l_linestatus:10(char!null) l_shipdate:11(date!null)
      │    │    │    └── stats: [rows=6001215, distinct(5)=50, null(5)=0, distinct(6)=925955, null(6)=0, distinct(7)=11, null(7)=0, distinct(8)=9, null(8)=0, distinct(9)=3, null(9)=0, distinct(10)=2, null(10)=0, distinct(11)=2526, null(11)=0, distinct(6,7)=6.00122e+06, null(6,7)=0, distinct(9,10)=6, null(9,10)=0, distinct(6-8)=6.00122e+06, null(6-8)=0]
      │    │    │        histogram(5)=  0 1.1342e+05 5.766e+06 1.2182e+05
      │    │    │                     <----- 1.0 ---------------- 50.0 --
      │    │    │        histogram(6)=  0   600    6e+06    600
      │    │    │                     <--- 929.02 ------- 104249.0
      │    │    │        histogram(7)=  0 5.4971e+05 4.9108e+06 5.4071e+05
      │    │    │                     <----- 0.0 ----------------- 0.1 ---
      │    │    │        histogram(8)=  0 6.5833e+05 4.6815e+06 6.6133e+05
      │    │    │                     <----- 0.0 ----------------- 0.08 --
      │    │    │        histogram(9)=  0 1.4955e+06 3.0372e+06 1.4685e+06
      │    │    │                     <----- 'A' ----------------- 'R' ---
      │    │    │        histogram(10)=  0 3.009e+06 0 2.9922e+06
      │    │    │                      <----- 'F' ------- 'O' ---
      │    │    │        histogram(11)=  0       0       4      600       29406      600       28806      2400      28206      2400      28206      1800      28806      1200      28206      2400      26405      3601      27606      3601      28206      2400      28806      3001      28206      2400      27606      2400      29406      1800      29406      3601      28806      1800      27606      4201      27005      3001      25205      4801      25805      4801      27005      4201      28206      1800      26405      3601      26405      3601      23405      7201      29406      2400      26405      3601      28206      2400      27005      3601      28206      3001      29406      1800      25805      4801      28806      3001      28806      1800      29406      1800      27005      4201      29406      4201      27606      2400      28206      3601      28806      1800      26405      3001      27606      3601      24605      4801      27005      5401      28206      2400      28806      1200      28206      4201      27005      2400      27606      3601      27606      2400      28206      2400      28206      1200      28806      3001      28206      1200      25805      6001      28806      1800      27606      4201      27005      5401      28806      3001      27606      2400      24005      5401      24605      5401      28206      3601      26405      3001      27005      2400      28806      3601      28206      1800      28806      2400      28806      1800      28206      1800      27606      3601      28206      3001      26405      3001      28206      1200      28206      2400      28806      1200      27606      3001      24605      5401      28806      1800      25805      3601      27005      2400      28806      1800      28806      600       28806      600       27606      3601      28206      3001      27005      3601      27606      2400      26405      5401      28806      1800      28206      4201      26405      6601      27606      2400      27005      3601      28806      3601      28806      3001      28206      3001      27005      3001      28206      1800      28206      4801      25205      5401      27005      4201      24605      5401      28806      3601      24605      6001      26405      3001      28806      2400      28806      1800      28206      1800      28806      4201      28806      1800      28806      3601      28206      4201      28206      3001      28206      1200      28206      600       27606      3601      25805      3001      25805      3001      27606      2400      26405      3001      25805      4801      27005      1800      28206      3601      28206      1200      25805      3601      27005      4201      28206      3601      27606      3001      26405      3601      24605      4201      24605      4201      27606      2400      25805      3001      28206      2400      28206      4201      27005      3001      25205      3601      26405      2400      27005      3601      25805      3601      27606      1200      25805      3001      27005      3001      26405      2400      28206      3601      28206      2400      27005      4201      27606      1800      27606      3001      24605      4801      28206      3001      28206      3001      27606      2400      26405      3601      27005      2400      27005      1800      26405      3001      25205      4201      25205      3601      27606      3601      27005      1800      25205      3001      26405      3601      25205      3001      26405      1800      25805      3001      25205      3601      23405      5401      27606      2400      27005      3001      25805      2400      27005      2400      25205      4201      27606      5401      24005      4201      26405      3001      24005      4201      27005      1800      26405      1200      27005      3601      26405      3601      26405      1800      27005      2400      27005      3001      24605      3001      24005      3601      27005      2400      26405      2400      25205      2400      25805      1800      25805      3001      24605      2400      24605      2400      25805      3001      25805      1800      24605      3001      22805      3601      25205      1800      25205      600       4      0
      │    │    │                      <--- '-infinity' --- '1992-01-04' ------- '1992-02-26' ------- '1992-03-21' ------- '1992-04-04' ------- '1992-04-17' ------- '1992-05-04' ------- '1992-05-17' ------- '1992-05-29' ------- '1992-06-09' ------- '1992-06-22' ------- '1992-07-06' ------- '1992-07-19' ------- '1992-08-01' ------- '1992-08-13' ------- '1992-08-26' ------- '1992-09-07' ------- '1992-09-19' ------- '1992-10-01' ------- '1992-10-14' ------- '1992-10-26' ------- '1992-11-06' ------- '1992-11-21' ------- '1992-12-04' ------- '1992-12-15' ------- '1992-12-24' ------- '1993-01-06' ------- '1993-01-18' ------- '1993-01-31' ------- '1993-02-13' ------- '1993-02-25' ------- '1993-03-09' ------- '1993-03-19' ------- '1993-03-31' ------- '1993-04-11' ------- '1993-04-27' ------- '1993-05-06' ------- '1993-05-18' ------- '1993-06-01' ------- '1993-06-13' ------- '1993-06-25' ------- '1993-07-08' ------- '1993-07-21' ------- '1993-08-03' ------- '1993-08-16' ------- '1993-08-29' ------- '1993-09-10' ------- '1993-09-19' ------- '1993-10-02' ------- '1993-10-13' ------- '1993-10-25' ------- '1993-11-06' ------- '1993-11-18' ------- '1993-11-29' ------- '1993-12-12' ------- '1993-12-24' ------- '1994-01-06' ------- '1994-01-20' ------- '1994-02-01' ------- '1994-02-14' ------- '1994-02-25' ------- '1994-03-11' ------- '1994-03-24' ------- '1994-04-07' ------- '1994-04-19' ------- '1994-05-03' ------- '1994-05-14' ------- '1994-05-24' ------- '1994-06-04' ------- '1994-06-14' ------- '1994-06-26' ------- '1994-07-06' ------- '1994-07-17' ------- '1994-08-01' ------- '1994-08-11' ------- '1994-08-25' ------- '1994-09-05' ------- '1994-09-16' ------- '1994-09-26' ------- '1994-10-07' ------- '1994-10-17' ------- '1994-10-27' ------- '1994-11-09' ------- '1994-11-22' ------- '1994-12-04' ------- '1994-12-16' ------- '1995-01-01' ------- '1995-01-14' ------- '1995-01-26' ------- '1995-02-06' ------- '1995-02-19' ------- '1995-03-03' ------- '1995-03-17' ------- '1995-04-01' ------- '1995-04-13' ------- '1995-04-26' ------- '1995-05-12' ------- '1995-05-25' ------- '1995-06-06' ------- '1995-06-19' ------- '1995-07-02' ------- '1995-07-12' ------- '1995-07-27' ------- '1995-08-08' ------- '1995-08-20' ------- '1995-08-31' ------- '1995-09-11' ------- '1995-09-23' ------- '1995-10-07' ------- '1995-10-18' ------- '1995-11-01' ------- '1995-11-13' ------- '1995-11-26' ------- '1995-12-09' ------- '1995-12-22' ------- '1996-01-02' ------- '1996-01-14' ------- '1996-01-25' ------- '1996-02-07' ------- '1996-02-18' ------- '1996-02-28' ------- '1996-03-12' ------- '1996-03-22' ------- '1996-04-01' ------- '1996-04-13' ------- '1996-04-23' ------- '1996-05-04' ------- '1996-05-18' ------- '1996-05-30' ------- '1996-06-12' ------- '1996-06-24' ------- '1996-07-05' ------- '1996-07-19' ------- '1996-07-31' ------- '1996-08-10' ------- '1996-08-24' ------- '1996-09-07' ------- '1996-09-20' ------- '1996-10-02' ------- '1996-10-14' ------- '1996-10-24' ------- '1996-11-05' ------- '1996-11-20' ------- '1996-12-01' ------- '1996-12-13' ------- '1996-12-25' ------- '1997-01-07' ------- '1997-01-19' ------- '1997-02-02' ------- '1997-02-13' ------- '1997-02-24' ------- '1997-03-08' ------- '1997-03-21' ------- '1997-04-01' ------- '1997-04-14' ------- '1997-04-26' ------- '1997-05-09' ------- '1997-05-18' ------- '1997-05-31' ------- '1997-06-13' ------- '1997-06-27' ------- '1997-07-09' ------- '1997-07-22' ------- '1997-07-31' ------- '1997-08-11' ------- '1997-08-25' ------- '1997-09-05' ------- '1997-09-17' ------- '1997-09-29' ------- '1997-10-10' ------- '1997-10-26' ------- '1997-11-07' ------- '1997-11-18' ------- '1997-12-03' ------- '1997-12-15' ------- '1997-12-27' ------- '1998-01-11' ------- '1998-01-24' ------- '1998-02-02' ------- '1998-02-14' ------- '1998-03-01' ------- '1998-03-10' ------- '1998-03-20' ------- '1998-04-02' ------- '1998-04-14' ------- '1998-04-26' ------- '1998-05-09' ------- '1998-05-18' ------- '1998-05-27' ------- '1998-06-06' ------- '1998-06-18' ------- '1998-06-29' ------- '1998-07-10' ------- '1998-07-22' ------- '1998-08-01' ------- '1998-08-10' ------- '1998-08-21' ------- '1998-09-05' ------- '1998-09-21' ------- '1998-10-14' ------- '1998-11-25' --- 'infinity'
      │    │    └── filters
      │    │         └── l_shipdate:11 <= '1998-09-02' [type=bool, outer=(11), constraints=(/11: (/NULL - /'1998-09-02']; tight)]
      │    └── projections
      │         ├── l_extendedprice:6 * (1.0 - l_discount:7) [as=column21:21, type=float, outer=(6,7), immutable]
      │         └── (l_extendedprice:6 * (1.0 - l_discount:7)) * (l_tax:8 + 1.0) [as=column23:23, type=float, outer=(6-8), immutable]
      └── aggregations
           ├── sum [as=sum:19, type=float, outer=(5)]
           │    └── l_quantity:5 [type=float]
           ├── sum [as=sum:20, type=float, outer=(6)]
           │    └── l_extendedprice:6 [type=float]
           ├── sum [as=sum:22, type=float, outer=(21)]
           │    └── column21:21 [type=float]
           ├── sum [as=sum:24, type=float, outer=(23)]
           │    └── column23:23 [type=float]
           ├── avg [as=avg:25, type=float, outer=(5)]
           │    └── l_quantity:5 [type=float]
           ├── avg [as=avg:26, type=float, outer=(6)]
           │    └── l_extendedprice:6 [type=float]
           ├── avg [as=avg:27, type=float, outer=(7)]
           │    └── l_discount:7 [type=float]
           └── count-rows [as=count_rows:28, type=int]

----Stats for q1_sort_1----
column_names      row_count  distinct_count  null_count
{avg_disc}        4          4               0
{avg_price}       4          4               0
{avg_qty}         4          4               0
{count_order}     4          4               0
{l_linestatus}    4          2               0
{l_returnflag}    4          3               0
{sum_base_price}  4          4               0
{sum_charge}      4          4               0
{sum_disc_price}  4          4               0
{sum_qty}         4          4               0
~~~~
column_names      row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{avg_disc}        6.00           1.50           6.00                1.50                0.00            1.00
{avg_price}       6.00           1.50           6.00                1.50                0.00            1.00
{avg_qty}         6.00           1.50           6.00                1.50                0.00            1.00
{count_order}     6.00           1.50           6.00                1.50                0.00            1.00
{l_linestatus}    6.00           1.50           2.00                1.00                0.00            1.00
{l_returnflag}    6.00           1.50           3.00                1.00                0.00            1.00
{sum_base_price}  6.00           1.50           6.00                1.50                0.00            1.00
{sum_charge}      6.00           1.50           6.00                1.50                0.00            1.00
{sum_disc_price}  6.00           1.50           6.00                1.50                0.00            1.00
{sum_qty}         6.00           1.50           6.00                1.50                0.00            1.00

----Stats for q1_group_by_2----
column_names    row_count  distinct_count  null_count
{avg_1}         4          4               0
{avg_2}         4          4               0
{avg}           4          4               0
{count_rows}    4          4               0
{l_linestatus}  4          2               0
{l_returnflag}  4          3               0
{sum_1}         4          4               0
{sum_2}         4          4               0
{sum_3}         4          4               0
{sum}           4          4               0
~~~~
column_names    row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{avg}           6.00           1.50           6.00                1.50                0.00            1.00
{avg_1}         6.00           1.50           6.00                1.50                0.00            1.00
{avg_2}         6.00           1.50           6.00                1.50                0.00            1.00
{count_rows}    6.00           1.50           6.00                1.50                0.00            1.00
{l_linestatus}  6.00           1.50           2.00                1.00                0.00            1.00
{l_returnflag}  6.00           1.50           3.00                1.00                0.00            1.00
{sum}           6.00           1.50           6.00                1.50                0.00            1.00
{sum_1}         6.00           1.50           6.00                1.50                0.00            1.00
{sum_2}         6.00           1.50           6.00                1.50                0.00            1.00
{sum_3}         6.00           1.50           6.00                1.50                0.00            1.00

----Stats for q1_project_3----
column_names       row_count  distinct_count  null_count
{column21}         5916591    4150364         0
{column23}         5916591    5661182         0
{l_discount}       5916591    11              0
{l_extendedprice}  5916591    925955          0
{l_linestatus}     5916591    2               0
{l_quantity}       5916591    50              0
{l_returnflag}     5916591    3               0
~~~~
column_names       row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{column21}         5915479.00     1.00           5915479.00          1.43                0.00            1.00
{column23}         5915479.00     1.00           5915479.00          1.04                0.00            1.00
{l_discount}       5915479.00     1.00           11.00               1.00                0.00            1.00
{l_extendedprice}  5915479.00     1.00           925955.00           1.00                0.00            1.00
{l_linestatus}     5915479.00     1.00           2.00                1.00                0.00            1.00
{l_quantity}       5915479.00     1.00           50.00               1.00                0.00            1.00
{l_returnflag}     5915479.00     1.00           3.00                1.00                0.00            1.00

----Stats for q1_select_4----
column_names       row_count  distinct_count  null_count
{l_discount}       5916591    11              0
{l_extendedprice}  5916591    925955          0
{l_linestatus}     5916591    2               0
{l_quantity}       5916591    50              0
{l_returnflag}     5916591    3               0
{l_shipdate}       5916591    2436            0
{l_tax}            5916591    9               0
~~~~
column_names       row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{l_discount}       5915479.00     1.00           11.00               1.00                0.00            1.00
{l_extendedprice}  5915479.00     1.00           925955.00           1.00                0.00            1.00
{l_linestatus}     5915479.00     1.00           2.00                1.00                0.00            1.00
{l_quantity}       5915479.00     1.00           50.00               1.00                0.00            1.00
{l_returnflag}     5915479.00     1.00           3.00                1.00                0.00            1.00
{l_shipdate}       5915479.00     1.00           2438.00             1.00                0.00            1.00
{l_tax}            5915479.00     1.00           9.00                1.00                0.00            1.00

----Stats for q1_scan_5----
column_names       row_count  distinct_count  null_count
{l_discount}       6001215    11              0
{l_extendedprice}  6001215    925955          0
{l_linestatus}     6001215    2               0
{l_quantity}       6001215    50              0
{l_returnflag}     6001215    3               0
{l_shipdate}       6001215    2526            0
{l_tax}            6001215    9               0
~~~~
column_names       row_count_est  row_count_err  distinct_count_est  distinct_count_err  null_count_est  null_count_err
{l_discount}       6001215.00     1.00           11.00               1.00                0.00            1.00
{l_extendedprice}  6001215.00     1.00           925955.00           1.00                0.00            1.00
{l_linestatus}     6001215.00     1.00           2.00                1.00                0.00            1.00
{l_quantity}       6001215.00     1.00           50.00               1.00                0.00            1.00
{l_returnflag}     6001215.00     1.00           3.00                1.00                0.00            1.00
{l_shipdate}       6001215.00     1.00           2526.00             1.00                0.00            1.00
{l_tax}            6001215.00     1.00           9.00                1.00                0.00            1.00
----
----
