Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/modules/demos/pages/trino-iceberg.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ You can list the tables that are part of the dataset using:
[source,sql]
----
show tables in tpch.sf5;
----

[source]
----
Table
----------
customer
Expand Down Expand Up @@ -231,7 +234,10 @@ Afterwards you can query the view using:
[source,sql]
----
select * from table_information order by records desc;
----

[source]
----
table | records | size_in_bytes | num_files | avg_file_size | min_file_size | max_file_size | snapshots | avg_record_size
----------+----------+---------------+-----------+---------------+---------------+---------------+-----------+-----------------
lineitem | 29999795 | 832M | 7 | 119M | 20.7M | 220M | 1 | 27
Expand Down Expand Up @@ -270,7 +276,10 @@ select
from lineitem
group by returnflag, linestatus
order by returnflag, linestatus;
----

[source]
----
returnflag | linestatus | sum_qty | sum_base_price | sum_disc_price | sum_charge | avg_qty | avg_price | avg_disc | count_order
------------+------------+------------------+-----------------------+-----------------------+-----------------------+--------------------+-------------------+---------------------+-------------
A | F | 3.77571137746E11 | 5.661718069977699E14 | 5.3786257473244656E14 | 5.5937697399894625E14 | 25.499847411525963 | 38237.283637033 | 0.05000115102912903 | 14806799886
Expand Down Expand Up @@ -353,7 +362,10 @@ First, let's see its current status:
[source,sql]
----
select * from customer where custkey = 112501;
----

[source]
----
custkey | name | address | nationkey | phone | acctbal | mktsegment | comment
---------+--------------------+---------------+-----------+-----------------+---------+------------+-----------------------------------------------------------------------------------------------------------
112501 | Customer#000112501 | DWA,dNub2S5a0 | 3 | 13-503-907-7391 | 2490.91 | AUTOMOBILE | onic dependencies. slyly regular waters was among the final packages. asymptotes nod fluffily blithely un
Expand Down Expand Up @@ -382,6 +394,10 @@ Let's inspect the `orders` table first:
[source,sql]
----
describe orders;
----

[source]
----
Column | Type | Extra | Comment
---------------+---------+-------+---------
orderkey | bigint | |
Expand All @@ -408,6 +424,10 @@ Each record now has a new column called `orderpriority_prev` with a default valu
[source,sql]
----
select * from orders limit 1;
----

[source]
----
orderkey | custkey | orderstatus | totalprice | orderdate | orderpriority | clerk | shippriority | comment | orderpriority_prev
----------+---------+-------------+------------+------------+---------------+-----------------+--------------+---------------------------------------------------------------------+--------------------
11827265 | 367454 | O | 103958.7 | 1997-02-22 | 1-URGENT | Clerk#000000162 | 0 | atelets cajole bold packages. carefully silent dolphins cajole fina | NULL
Expand All @@ -425,7 +445,10 @@ Let's check the current priority of the orders of the VIP customers:
[source,sql]
----
select orderpriority, count(*) from orders where custkey in (select custkey from customers_to_prioritize) group by 1 order by 1;
----

[source]
----
orderpriority | _col1
-----------------+-------
1-URGENT | 7482
Expand All @@ -452,7 +475,10 @@ All the orders should now have top priority:
[source,sql]
----
select orderpriority, count(*) from orders where custkey in (select custkey from customers_to_prioritize) group by 1 order by 1;
----

[source]
----
orderpriority | _col1
---------------+-------
1-URGENT | 37331
Expand All @@ -464,7 +490,10 @@ But you can still access the previous priority. It should return the same counts
[source,sql]
----
select orderpriority_prev, count(*) from orders where custkey in (select custkey from customers_to_prioritize) group by 1 order by 1;
----

[source]
----
orderpriority_prev | _col1
--------------------+-------
1-URGENT | 7482
Expand Down
Loading