@@ -110,7 +110,10 @@ You can list the tables that are part of the dataset using:
110110[source,sql]
111111----
112112show tables in tpch.sf5;
113+ ----
113114
115+ [source]
116+ ----
114117 Table
115118----------
116119 customer
@@ -231,7 +234,10 @@ Afterwards you can query the view using:
231234[source,sql]
232235----
233236select * from table_information order by records desc;
237+ ----
234238
239+ [source]
240+ ----
235241 table | records | size_in_bytes | num_files | avg_file_size | min_file_size | max_file_size | snapshots | avg_record_size
236242----------+----------+---------------+-----------+---------------+---------------+---------------+-----------+-----------------
237243 lineitem | 29999795 | 832M | 7 | 119M | 20.7M | 220M | 1 | 27
@@ -270,7 +276,10 @@ select
270276from lineitem
271277group by returnflag, linestatus
272278order by returnflag, linestatus;
279+ ----
273280
281+ [source]
282+ ----
274283 returnflag | linestatus | sum_qty | sum_base_price | sum_disc_price | sum_charge | avg_qty | avg_price | avg_disc | count_order
275284------------+------------+------------------+-----------------------+-----------------------+-----------------------+--------------------+-------------------+---------------------+-------------
276285 A | F | 3.77571137746E11 | 5.661718069977699E14 | 5.3786257473244656E14 | 5.5937697399894625E14 | 25.499847411525963 | 38237.283637033 | 0.05000115102912903 | 14806799886
@@ -353,7 +362,10 @@ First, let's see its current status:
353362[source,sql]
354363----
355364select * from customer where custkey = 112501;
365+ ----
356366
367+ [source]
368+ ----
357369 custkey | name | address | nationkey | phone | acctbal | mktsegment | comment
358370---------+--------------------+---------------+-----------+-----------------+---------+------------+-----------------------------------------------------------------------------------------------------------
359371 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
@@ -382,6 +394,10 @@ Let's inspect the `orders` table first:
382394[source,sql]
383395----
384396describe orders;
397+ ----
398+
399+ [source]
400+ ----
385401 Column | Type | Extra | Comment
386402---------------+---------+-------+---------
387403 orderkey | bigint | |
@@ -408,6 +424,10 @@ Each record now has a new column called `orderpriority_prev` with a default valu
408424[source,sql]
409425----
410426select * from orders limit 1;
427+ ----
428+
429+ [source]
430+ ----
411431 orderkey | custkey | orderstatus | totalprice | orderdate | orderpriority | clerk | shippriority | comment | orderpriority_prev
412432----------+---------+-------------+------------+------------+---------------+-----------------+--------------+---------------------------------------------------------------------+--------------------
413433 11827265 | 367454 | O | 103958.7 | 1997-02-22 | 1-URGENT | Clerk#000000162 | 0 | atelets cajole bold packages. carefully silent dolphins cajole fina | NULL
@@ -425,7 +445,10 @@ Let's check the current priority of the orders of the VIP customers:
425445[source,sql]
426446----
427447select orderpriority, count(*) from orders where custkey in (select custkey from customers_to_prioritize) group by 1 order by 1;
448+ ----
428449
450+ [source]
451+ ----
429452 orderpriority | _col1
430453-----------------+-------
431454 1-URGENT | 7482
@@ -452,7 +475,10 @@ All the orders should now have top priority:
452475[source,sql]
453476----
454477select orderpriority, count(*) from orders where custkey in (select custkey from customers_to_prioritize) group by 1 order by 1;
478+ ----
455479
480+ [source]
481+ ----
456482 orderpriority | _col1
457483---------------+-------
458484 1-URGENT | 37331
@@ -464,7 +490,10 @@ But you can still access the previous priority. It should return the same counts
464490[source,sql]
465491----
466492select orderpriority_prev, count(*) from orders where custkey in (select custkey from customers_to_prioritize) group by 1 order by 1;
493+ ----
467494
495+ [source]
496+ ----
468497 orderpriority_prev | _col1
469498--------------------+-------
470499 1-URGENT | 7482
0 commit comments