Add NoSQL grammar:
Please make FROM a synonym for FOR, SELECT a synonym for RETURN, and WITH a synonym for LET.  No semantic changes here - just some keyword synonyms.

Change-Id: Iffba1c25c611fc420b6e223bcdde75a9244035e4
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/181
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <westmann@gmail.com>
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestCase.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestCase.java
index 7b9c08b..da5068a 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestCase.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestCase.java
@@ -38,7 +38,7 @@
 
 public class AQLTestCase extends TestCase {
 
-    private File queryFile;
+    private final File queryFile;
 
     AQLTestCase(File queryFile) {
         super("testAQL");
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestSuite.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestSuite.java
index f65870d..a846ea4 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestSuite.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestSuite.java
@@ -26,8 +26,10 @@
 import edu.uci.ics.asterix.aql.parser.ParseException;
 
 public class AQLTestSuite extends TestSuite {
-    private static String AQLTS_PATH = StringUtils.join(new String[] {"src", "test", 
-            "resources", "AQLTS", "queries" + File.separator}, File.separator);
+    private static String AQLTS_PATH = StringUtils.join(new String[] { "src", "test", "resources", "AQLTS",
+            "queries" + File.separator }, File.separator);
+    private static String AQLTS_SQL_LIKE_PATH = StringUtils.join(new String[] { "src", "test", "resources", "AQLTS",
+            "queries-sql-like" + File.separator }, File.separator);
 
     public static Test suite() throws ParseException, UnsupportedEncodingException, FileNotFoundException {
         File testData = new File(AQLTS_PATH);
@@ -38,6 +40,13 @@
                 testSuite.addTest(new AQLTestCase(file));
             }
         }
+        testData = new File(AQLTS_SQL_LIKE_PATH);
+        queries = testData.listFiles();
+        for (File file : queries) {
+            if (file.isFile()) {
+                testSuite.addTest(new AQLTestCase(file));
+            }
+        }
 
         return testSuite;
 
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/1.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/1.aql
new file mode 100644
index 0000000..37a2b3f
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/1.aql
@@ -0,0 +1,3 @@
+from $user in dataset('User')
+where some $i in $user.interests satisfies $i = "movies"
+select { "name": $user.name }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/2.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/2.aql
new file mode 100644
index 0000000..d094e7e
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/2.aql
@@ -0,0 +1,12 @@
+from $event in dataset('Event')
+from $sponsor in $event.sponsoring_sigs
+with $es := { "event": $event, "sponsor": $sponsor }
+group by $sig_name := $sponsor.sig_name with $es
+with $sig_sponsorship_count := count($es)
+with $by_chapter :=
+   from $e in $es
+   group by $chapter_name := $e.sponsor.chapter_name with $es
+   select { "chapter_name": $chapter_name, "escount" : count($es) }
+order by $sig_sponsorship_count desc
+limit 5
+select { "sig_name": $sig_name, "total_count": $sig_sponsorship_count, "chapter_breakdown": $by_chapter }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/4.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/4.aql
new file mode 100644
index 0000000..ca9e728
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/4.aql
@@ -0,0 +1,8 @@
+from $sig in dataset('SIGroup')
+where $sig.name = "Movie-Watchers"
+with $similar_sigs :=
+   from $similar_sig in dataset('SIGroup')
+   where $similar_sig != $sig
+   and $similar_sig.interests ~= $sig.interests
+   select { "sig_name" : $similar_sig.name }
+select { "similar_sigs" : $similar_sigs }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/5.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/5.aql
new file mode 100644
index 0000000..4fe6be0
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/5.aql
@@ -0,0 +1,10 @@
+from $event in dataset('Event')
+where $event.name = "The Night of the Ad Eaters, 29th edition"
+with $collocated_events :=
+   from $collocated_event in dataset('Events')
+   where $collocated_event.location.street ~= $event.location.street
+   and $collocated_event.location.city = $event.location.city
+   and $collocated_event.location.state = $event.location.state
+   and $collocated_event.location.zip = $event.location.zip
+   select { "event_name" : $collocated_event.name }
+select { "collocated_evnets" : $collocated_events }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/6.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/6.aql
new file mode 100644
index 0000000..f71a00c
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/6.aql
@@ -0,0 +1,10 @@
+from $user in dataset('Users')
+with $similar_users :=
+   from $similar_user in dataset('Users')
+   with $similarity := jaccard_similarity($user.interests, $similar_user.interests)
+   where $user != $similar_user
+   and $similarity >= .75
+   order by $similarity desc
+   limit 10
+   select { "user_name" : $similar_user.name, "similarity" : $similarity }
+select { "user_name" : $user.name, "similar_users" : $similar_users }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/ANYInFieldAccessor.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/ANYInFieldAccessor.aql
new file mode 100644
index 0000000..61ef75b
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/ANYInFieldAccessor.aql
@@ -0,0 +1,4 @@
+from $user in dataset('User')
+from $mv in dataset('Movie')
+where some $i in $user.interests satisfies $i.movie = $mv.movie[?]
+select { "name": $user.name, "movie": $mv.movie }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/IfInFLOWGR.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/IfInFLOWGR.aql
new file mode 100644
index 0000000..b3d7a72
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/IfInFLOWGR.aql
@@ -0,0 +1,3 @@
+from $i in [1,2,30,40]
+from $j in {{4,5,6}}
+select if ($i>$j) then $i else $j
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/ListConstructor.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/ListConstructor.aql
new file mode 100644
index 0000000..ca990fc
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/ListConstructor.aql
@@ -0,0 +1,3 @@
+from $i in [1,2,3]
+from $j in {{4,5,6}}
+select $i+$j
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/WithFrom.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/WithFrom.aql
new file mode 100644
index 0000000..1ec743a
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/WithFrom.aql
@@ -0,0 +1,4 @@
+with $users := dataset('User')
+from $user in $users
+where some $i in $user.interests satisfies $i = "movies"
+select { "name": $user.name }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/fieldAccessor.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/fieldAccessor.aql
new file mode 100644
index 0000000..3b1c725
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/fieldAccessor.aql
@@ -0,0 +1,3 @@
+with $bla := { "name" : "value" }
+return
+  $bla."name" = $bla.name
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/functionDecl1.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/functionDecl1.aql
new file mode 100644
index 0000000..9a77c84
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/functionDecl1.aql
@@ -0,0 +1,17 @@
+declare function calculate($events){
+from $event in $events
+from $sponsor in $event.sponsoring_sigs
+with $es := { "event": $event, "sponsor": $sponsor }
+group by $sig_name := $sponsor.sig_name with $es
+with $sig_sponsorship_count := count($es)
+with $by_chapter :=
+   from $e in $es
+   group by $chapter_name := $e.sponsor.chapter_name with $es
+   select { "chapter_name": $chapter_name, "escount" : count($es) }
+order by $sig_sponsorship_count desc
+limit 5
+select { "sig_name": $sig_name, "total_count": $sig_sponsorship_count, "chapter_breakdown": $by_chapter }
+}
+
+with $result := calculate(dataset('Events'))
+select $result
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR.aql
new file mode 100644
index 0000000..98424dc
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR.aql
@@ -0,0 +1,5 @@
+from $user in
+    with $data := dataset('User')
+    select $data
+where some $i in $user.interests satisfies $i = "movies"
+select { "name": $user.name }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR1.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR1.aql
new file mode 100644
index 0000000..a9c59f2
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR1.aql
@@ -0,0 +1,6 @@
+from $i in [1,2,30,40]
+from $j in {{4,5,6}}
+select
+    from $k in if ($i>$j) then $i else $j
+    where $k <10
+    select $k
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR2.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR2.aql
new file mode 100644
index 0000000..3ceca7a
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR2.aql
@@ -0,0 +1,6 @@
+from $i in [1,2,30,from $tmp in dataset('number') select $tmp]
+from $j in {{4,5,6}}
+select
+    from $k in if ($i>$j) then $i else $j
+    where $k <10
+    select $k
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR3.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR3.aql
new file mode 100644
index 0000000..0f5fa5f
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFLWOGR3.aql
@@ -0,0 +1,12 @@
+from $event in dataset('Event')
+from $sponsor in $event.sponsoring_sigs
+with $es := { "event": $event, "sponsor": $sponsor }
+group by $sig_name := $sponsor.sig_name with $es
+with $sig_sponsorship_count := count($es)
+with $by_chapter :=
+   from $e in $es
+   group by $chapter_name := $e.sponsor.chapter_name with $es
+   select { "chapter_name": $chapter_name, "escount" : count($es) }
+order by $sig_sponsorship_count desc
+limit 5 offset 2
+select { "sig_name": $sig_name, "total_count": $sig_sponsorship_count, "chapter_breakdown": $by_chapter }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFor.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFor.aql
new file mode 100644
index 0000000..26c3564
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/nestedFor.aql
@@ -0,0 +1,4 @@
+from $user in dataset('User')
+from $mv in dataset('Movie')
+where some $i in $user.interests satisfies $i.movie = $mv.movie
+select { "name": $user.name, "movie": $mv.movie }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/numberInFieldAccessor.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/numberInFieldAccessor.aql
new file mode 100644
index 0000000..b52ff3a
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/numberInFieldAccessor.aql
@@ -0,0 +1,4 @@
+from $user in dataset('User')
+from $mv in dataset('Movie')
+where some $i in $user.interests satisfies $i.movie = $mv.movie[2]
+select { "name": $user.name, "movie": $mv.movie }
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/union.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/union.aql
new file mode 100644
index 0000000..fc4352d
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/union.aql
@@ -0,0 +1,8 @@
+(from $l in foo1()
+select $l)
+union
+(from $l in foo2()
+select $l)
+union
+(from $l in foo3()
+select $l)
diff --git a/asterix-app/src/test/resources/AQLTS/queries-sql-like/variables.aql b/asterix-app/src/test/resources/AQLTS/queries-sql-like/variables.aql
new file mode 100644
index 0000000..0cf91cd
--- /dev/null
+++ b/asterix-app/src/test/resources/AQLTS/queries-sql-like/variables.aql
@@ -0,0 +1,4 @@
+with $a:=1
+with $b:=1
+return
+  $b-$a
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.1.ddl.aql
new file mode 100644
index 0000000..64b1554
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.1.ddl.aql
@@ -0,0 +1,27 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_returnflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.2.update.aql
new file mode 100644
index 0000000..b8220ce
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.2.update.aql
@@ -0,0 +1,6 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.query.aql
new file mode 100644
index 0000000..77ce59b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.3.query.aql
@@ -0,0 +1,22 @@
+use dataverse tpch;
+set import-private-functions 'true';
+
+from $l in dataset('LineItem')
+where $l.l_shipdate <= '1998-09-02'
+/*+ hash*/
+group by $l_returnflag := $l.l_returnflag,
+         $l_linestatus := $l.l_linestatus
+  with $l
+order by $l_returnflag, $l_linestatus
+select {
+  "l_returnflag": $l_returnflag,
+  "l_linestatus": $l_linestatus,
+  "sum_qty": sum(from $i in $l select $i.l_quantity),
+  "sum_base_price": sum(from $i in $l select $i.l_extendedprice),
+  "sum_disc_price": sum(from $i in $l select $i.l_extendedprice * (1 - $i.l_discount)),
+  "sum_charge": sum(from $i in $l select $i.l_extendedprice * (1 - $i.l_discount) * (1 + $i.l_tax)),
+  "ave_qty": avg(from $i in $l select $i.l_quantity),
+  "ave_price": avg(from $i in $l select $i.l_extendedprice),
+  "ave_disc": avg(from $i in $l select $i.l_discount),
+  "count_order": count($l)
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.aql
new file mode 100644
index 0000000..27bce43
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.3.query.aql
@@ -0,0 +1,117 @@
+use dataverse tpch;
+
+declare function tmp1() {
+  from $p in dataset('Part')
+  from $pssrn in (
+    from $ps in dataset('Partsupp')
+    from $srn in (
+      from $s in dataset('Supplier')
+      from $rn in (
+        from $r in dataset('Region')
+        from $n in dataset('Nation')
+        where $n.n_regionkey = $r.r_regionkey and $r.r_name = 'EUROPE'
+        select {
+          "n_nationkey": $n.n_nationkey,
+          "n_name": $n.n_name
+        }
+      )
+      where $s.s_nationkey = $rn.n_nationkey
+      select {
+        "s_suppkey": $s.s_suppkey,
+        "n_name": $rn.n_name,
+        "s_name": $s.s_name,
+        "s_acctbal": $s.s_acctbal,
+        "s_address": $s.s_address,
+        "s_phone": $s.s_phone,
+        "s_comment": $s.s_comment
+      }
+    )
+    where $srn.s_suppkey = $ps.ps_suppkey
+    select {
+      "n_name": $srn.n_name,
+      "p_partkey": $ps.ps_partkey,
+      "ps_supplycost": $ps.ps_supplycost,
+      "s_name": $srn.s_name,
+      "s_acctbal": $srn.s_acctbal,
+      "s_address":  $srn.s_address,
+      "s_phone":  $srn.s_phone,
+      "s_comment":  $srn.s_comment
+    }
+  )
+  where $p.p_partkey = $pssrn.p_partkey and like($p.p_type, '%BRASS')
+  select {
+    "s_acctbal": $pssrn.s_acctbal,
+    "s_name": $pssrn.s_name,
+    "n_name": $pssrn.n_name,
+    "p_partkey": $p.p_partkey,
+    "ps_supplycost": $pssrn.ps_supplycost,
+    "p_mfgr": $p.p_mfgr,
+    "s_address":  $pssrn.s_address,
+    "s_phone":  $pssrn.s_phone,
+    "s_comment":  $pssrn.s_comment
+  }
+}
+
+declare function tmp2(){
+  from $p in dataset('Part')
+  from $pssrn in (
+    from $ps in dataset('Partsupp')
+    from $srn in (
+      from $s in dataset('Supplier')
+      from $rn in (
+        from $r in dataset('Region')
+        from $n in dataset('Nation')
+        where $n.n_regionkey = $r.r_regionkey and $r.r_name = 'EUROPE'
+        select {
+          "n_nationkey": $n.n_nationkey,
+          "n_name": $n.n_name
+        }
+      )
+      where $s.s_nationkey = $rn.n_nationkey
+      select {
+        "s_suppkey": $s.s_suppkey,
+        "n_name": $rn.n_name,
+        "s_name": $s.s_name,
+        "s_acctbal": $s.s_acctbal,
+        "s_address": $s.s_address,
+        "s_phone": $s.s_phone,
+        "s_comment": $s.s_comment
+      }
+    )
+    where $srn.s_suppkey = $ps.ps_suppkey
+    select {
+      "n_name": $srn.n_name,
+      "p_partkey": $ps.ps_partkey,
+      "ps_supplycost": $ps.ps_supplycost,
+      "s_name": $srn.s_name,
+      "s_acctbal": $srn.s_acctbal,
+      "s_address":  $srn.s_address,
+      "s_phone":  $srn.s_phone,
+      "s_comment":  $srn.s_comment
+    }
+  )
+  where $p.p_partkey = $pssrn.p_partkey and like($p.p_type, '%BRASS')
+  /*+ hash*/
+  group by $p_partkey := $pssrn.p_partkey with $pssrn
+  select {
+    "p_partkey": $p_partkey,
+    "ps_min_supplycost": min(from $i in $pssrn select $i.ps_supplycost)
+  }
+}
+
+from $t2 in tmp2()
+from $t1 in tmp1()
+where $t1.p_partkey = $t2.p_partkey and $t1.ps_supplycost = $t2.ps_min_supplycost
+order by $t1.s_acctbal desc, $t1.n_name, $t1.s_name, $t1.p_partkey
+limit 100
+select
+{
+  "s_acctbal": $t1.s_acctbal,
+  "s_name": $t1.s_name,
+  "n_name": $t1.n_name,
+  "p_partkey": $t1.p_partkey,
+  "p_mfgr": $t1.p_mfgr,
+  "s_address": $t1.s_address,
+  "s_phone": $t1.s_phone,
+  "s_comment": $t1.s_comment
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.2.update.aql
new file mode 100644
index 0000000..2ae9773
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.2.update.aql
@@ -0,0 +1,14 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.query.aql
new file mode 100644
index 0000000..4ccd1c7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.3.query.aql
@@ -0,0 +1,26 @@
+use dataverse tpch;
+
+from $c in dataset('Customer')
+from $o in dataset('Orders')
+where
+  $c.c_mktsegment = 'BUILDING' and $c.c_custkey = $o.o_custkey
+from $l in dataset('LineItem')
+where
+  $l.l_orderkey = $o.o_orderkey and
+  $o.o_orderdate < '1995-03-15' and $l.l_shipdate > '1995-03-15'
+/*+ hash*/
+group by $l_orderkey := $l.l_orderkey, $o_orderdate := $o.o_orderdate, $o_shippriority := $o.o_shippriority
+  with $l
+with $revenue := sum (
+  from $i in $l
+  select
+    $i.l_extendedprice * (1 - $i.l_discount)
+)
+order by $revenue desc, $o_orderdate
+limit 10
+select {
+  "l_orderkey": $l_orderkey,
+  "revenue": $revenue,
+  "o_orderdate": $o_orderdate,
+  "o_shippriority": $o_shippriority
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.3.query.aql
new file mode 100644
index 0000000..b75936b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q04_order_priority/q04_order_priority.3.query.aql
@@ -0,0 +1,21 @@
+use dataverse tpch;
+
+declare function tmp()
+{
+  from $l in dataset('LineItem')
+  where $l.l_commitdate < $l.l_receiptdate
+  distinct by $l.l_orderkey
+  select { "o_orderkey": $l.l_orderkey }
+}
+
+from $o in dataset('Orders')
+from $t in tmp()
+where $o.o_orderkey = $t.o_orderkey and
+  $o.o_orderdate >= '1993-07-01' and $o.o_orderdate < '1993-10-01'
+group by $o_orderpriority := $o.o_orderpriority with $o
+order by $o_orderpriority
+select {
+  "order_priority": $o_orderpriority,
+  "count": count($o)
+}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.query.aql
new file mode 100644
index 0000000..7d2a7d9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.3.query.aql
@@ -0,0 +1,56 @@
+use dataverse tpch;
+
+from $c in dataset('Customer')
+from $o1 in (
+  from $o in dataset('Orders')
+  from $l1 in (
+    from $l in dataset('LineItem')
+    from $s1 in (
+      from $s in dataset('Supplier')
+      from $n1 in (
+        from $n in dataset('Nation')
+        from $r in dataset('Region')
+        where $n.n_regionkey = $r.r_regionkey
+        select {
+          "n_name": $n.n_name,
+          "n_nationkey": $n.n_nationkey
+        }
+      )
+      where $s.s_nationkey = $n1.n_nationkey
+      select {
+        "n_name": $n1.n_name,
+        "s_suppkey": $s.s_suppkey,
+        "s_nationkey": $s.s_nationkey
+      }
+    )
+    where $l.l_suppkey = $s1.s_suppkey
+    select {
+      "n_name": $s1.n_name,
+      "l_extendedprice": $l.l_extendedprice,
+      "l_discount": $l.l_discount,
+      "l_orderkey": $l.l_orderkey,
+      "s_nationkey": $s1.s_nationkey
+    }
+  )
+  where $l1.l_orderkey = $o.o_orderkey and $o.o_orderdate >= '1990-01-01' and $o.o_orderdate < '1995-01-01'
+  select {
+    "n_name": $l1.n_name,
+    "l_extendedprice": $l1.l_extendedprice,
+    "l_discount": $l1.l_discount,
+    "s_nationkey": $l1.s_nationkey,
+    "o_custkey": $o.o_custkey
+  }
+)
+where $c.c_nationkey = $o1.s_nationkey and $c.c_custkey = $o1.o_custkey
+/*+ hash*/
+group by $n_name := $o1.n_name with $o1
+with $revenue := sum (
+  from $i in $o1
+  select
+    $i.l_extendedprice * (1 - $i.l_discount)
+)
+order by $revenue desc
+select {
+  "n_name": $n_name,
+  "revenue": $revenue
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.query.aql
new file mode 100644
index 0000000..0254439
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.3.query.aql
@@ -0,0 +1,13 @@
+use dataverse tpch;
+
+with $revenue := sum(
+  from $l in dataset('LineItem')
+  where $l.l_shipdate >= '1994-01-01'
+    and $l.l_shipdate < '1995-01-01'
+    and $l.l_discount >= 0.05 and $l.l_discount <= 0.07
+    and $l.l_quantity < 24
+  select $l.l_extendedprice * $l.l_discount
+)
+select {
+  "revenue": $revenue
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.3.query.aql
new file mode 100644
index 0000000..7240456
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.3.query.aql
@@ -0,0 +1,63 @@
+use dataverse tpch;
+
+declare function q7_volume_shipping_tmp() {
+  from $n1 in dataset('Nation')
+  from $n2 in dataset('Nation')
+  where $n2.n_name='GERMANY' or $n1.n_name='GERMANY'
+  select {
+    "supp_nation": $n1.n_name,
+    "cust_nation": $n2.n_name,
+    "s_nationkey": $n1.n_nationkey,
+    "c_nationkey": $n2.n_nationkey
+  }
+}
+
+from $locs in (
+  from $loc in (
+    from $lo in (
+      from $l in dataset('LineItem')
+      from $o in dataset('Orders')
+      where $o.o_orderkey = $l.l_orderkey and $l.l_shipdate >= '1992-01-01'
+        and $l.l_shipdate <= '1996-12-31'
+      select {
+        "l_shipdate": $l.l_shipdate,
+        "l_extendedprice": $l.l_extendedprice,
+        "l_discount": $l.l_discount,
+        "l_suppkey": $l.l_suppkey,
+        "o_custkey": $o.o_custkey
+      }
+    )
+    from $c in dataset('Customer')
+    where $c.c_custkey = $lo.o_custkey
+    select {
+      "l_shipdate": $lo.l_shipdate,
+      "l_extendedprice": $lo.l_extendedprice,
+      "l_discount": $lo.l_discount,
+      "l_suppkey": $lo.l_suppkey,
+      "c_nationkey": $c.c_nationkey
+    }
+  )
+  from $s in dataset('Supplier')
+  where $s.s_suppkey = $loc.l_suppkey
+  select {
+    "l_shipdate": $loc.l_shipdate,
+    "l_extendedprice": $loc.l_extendedprice,
+    "l_discount": $loc.l_discount,
+    "c_nationkey": $loc.c_nationkey,
+    "s_nationkey": $s.s_nationkey
+  }
+)
+from $t in q7_volume_shipping_tmp()
+where $locs.c_nationkey = $t.c_nationkey
+  and $locs.s_nationkey = $t.s_nationkey
+with $l_year0 := get-year($locs.l_shipdate)
+group by $supp_nation := $t.supp_nation, $cust_nation := $t.cust_nation, $l_year := $l_year0
+with $locs
+with $revenue := sum(from $i in $locs select $i.l_extendedprice * (1 - $i.l_discount))
+order by $supp_nation, $cust_nation, $l_year
+select {
+  "supp_nation": $supp_nation,
+  "cust_nation": $cust_nation,
+  "l_year": $l_year,
+  "revenue": $revenue
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.2.update.aql
new file mode 100644
index 0000000..743fcf2
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.2.update.aql
@@ -0,0 +1,33 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.3.query.aql
new file mode 100644
index 0000000..962b6a0
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q08_national_market_share/q08_national_market_share.3.query.aql
@@ -0,0 +1,73 @@
+use dataverse tpch;
+
+from $t in (
+  from $slnrcop in (
+    from $s in dataset("Supplier")
+    from $lnrcop in (
+      from $lnrco in (
+        from $l in dataset('LineItem')
+        from $nrco in (
+          from $o in dataset('Orders')
+          from $nrc in (
+            from $c in dataset('Customer')
+            from $nr in (
+              from $n1 in dataset('Nation')
+              from $r1 in dataset('Region')
+              where $n1.n_regionkey = $r1.r_regionkey and $r1.r_name = 'AMERICA'
+              select { "n_nationkey": $n1.n_nationkey }
+            )
+            where $c.c_nationkey = $nr.n_nationkey
+            select { "c_custkey": $c.c_custkey }
+          )
+          where $nrc.c_custkey = $o.o_custkey
+          select {
+            "o_orderdate" : $o.o_orderdate,
+            "o_orderkey": $o.o_orderkey
+          }
+        )
+        where $l.l_orderkey = $nrco.o_orderkey
+          and $nrco.o_orderdate >= '1995-01-01'
+          and $nrco.o_orderdate < '1996-12-31'
+        select {
+          "o_orderdate": $nrco.o_orderdate,
+          "l_partkey": $l.l_partkey,
+          "l_discount": $l.l_discount,
+          "l_extendedprice": $l.l_extendedprice,
+          "l_suppkey": $l.l_suppkey
+        }
+      )
+      from $p in dataset("Part")
+      where $p.p_partkey = $lnrco.l_partkey and $p.p_type = 'ECONOMY ANODIZED STEEL'
+      select {
+        "o_orderdate": $lnrco.o_orderdate,
+        "l_discount": $lnrco.l_discount,
+        "l_extendedprice": $lnrco.l_extendedprice,
+        "l_suppkey": $lnrco.l_suppkey
+      }
+    )
+    where $s.s_suppkey = $lnrcop.l_suppkey
+    select {
+      "o_orderdate": $lnrcop.o_orderdate,
+      "l_discount": $lnrcop.l_discount,
+      "l_extendedprice": $lnrcop.l_extendedprice,
+      "l_suppkey": $lnrcop.l_suppkey,
+      "s_nationkey": $s.s_nationkey
+    }
+  )
+  from $n2 in dataset('Nation')
+  where $slnrcop.s_nationkey = $n2.n_nationkey
+  with $o_year := get-year($slnrcop.o_orderdate)
+  select {
+    "year": $o_year,
+    "revenue": $slnrcop.l_extendedprice *(1-$slnrcop.l_discount),
+    "s_name": $n2.n_name
+  }
+)
+group by $year := $t.year with $t
+order by $year
+select {
+  "year": $year,
+  "mkt_share": sum(from $i in $t select switch-case($i.s_name='BRAZIL', true, $i.revenue, false, 0.0))/
+        sum(from $i in $t select $i.revenue)
+}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.aql
new file mode 100644
index 0000000..5f9d13f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.3.query.aql
@@ -0,0 +1,67 @@
+use dataverse tpch;
+
+from $profit in (
+  from $o in dataset('Orders')
+  from $l3 in (
+    from $p in dataset('Part')
+    from $l2 in (
+      from $ps in dataset('Partsupp')
+      from $l1 in (
+        from $s1 in (
+          from $s in dataset('Supplier')
+          from $n in dataset('Nation')
+          where $n.n_nationkey = $s.s_nationkey
+          select {
+            "s_suppkey": $s.s_suppkey,
+            "n_name": $n.n_name
+          }
+        )
+        from $l in dataset('LineItem')
+        where $s1.s_suppkey = $l.l_suppkey
+        select  {
+          "l_suppkey": $l.l_suppkey,
+          "l_extendedprice": $l.l_extendedprice,
+          "l_discount": $l.l_discount,
+          "l_quantity": $l.l_quantity,
+          "l_partkey": $l.l_partkey,
+          "l_orderkey": $l.l_orderkey,
+          "n_name": $s1.n_name
+        }
+      )
+      where $ps.ps_suppkey = $l1.l_suppkey and $ps.ps_partkey = $l1.l_partkey
+      select {
+        "l_extendedprice": $l1.l_extendedprice,
+        "l_discount": $l1.l_discount,
+        "l_quantity": $l1.l_quantity,
+        "l_partkey": $l1.l_partkey,
+        "l_orderkey": $l1.l_orderkey,
+        "n_name": $l1.n_name,
+        "ps_supplycost": $ps.ps_supplycost
+      }
+    )
+    where contains($p.p_name, 'green') and $p.p_partkey = $l2.l_partkey
+    select {
+      "l_extendedprice": $l2.l_extendedprice,
+      "l_discount": $l2.l_discount,
+      "l_quantity": $l2.l_quantity,
+      "l_orderkey": $l2.l_orderkey,
+      "n_name": $l2.n_name,
+      "ps_supplycost": $l2.ps_supplycost
+    }
+  )
+  where $o.o_orderkey = $l3.l_orderkey
+  with $amount := $l3.l_extendedprice * (1 - $l3.l_discount) -  $l3.ps_supplycost * $l3.l_quantity
+  with $o_year := get-year($o.o_orderdate)
+  select {
+    "nation": $l3.n_name,
+    "o_year": $o_year,
+    "amount": $amount
+  }
+)
+group by $nation := $profit.nation, $o_year := $profit.o_year with $profit
+order by $nation, $o_year desc
+select {
+  "nation": $nation,
+  "o_year": $o_year,
+  "sum_profit": sum( from $pr in $profit select $pr.amount )
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.2.update.aql
new file mode 100644
index 0000000..e4fb739
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.3.query.aql
new file mode 100644
index 0000000..61a7f77
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item/q10_returned_item.3.query.aql
@@ -0,0 +1,55 @@
+use dataverse tpch;
+
+from $locn in (
+  from $l in dataset('LineItem')
+  from $ocn in (
+    from $o in dataset('Orders')
+    from $c in dataset('Customer')
+    where $c.c_custkey = $o.o_custkey and $o.o_orderdate >= '1993-10-01'
+      and $o.o_orderdate < '1994-01-01'
+    from $n in dataset('Nation')
+    where $c.c_nationkey = $n.n_nationkey
+    select {
+      "c_custkey": $c.c_custkey,
+      "c_name": $c.c_name,
+      "c_acctbal": $c.c_acctbal,
+      "n_name": $n.n_name,
+      "c_address": $c.c_address,
+      "c_phone": $c.c_phone,
+      "c_comment": $c.c_comment,
+      "o_orderkey": $o.o_orderkey
+    }
+  )
+  where $l.l_orderkey = $ocn.o_orderkey and $l.l_selectflag = 'R'
+  select {
+    "c_custkey": $ocn.c_custkey,
+    "c_name": $ocn.c_name,
+    "c_acctbal": $ocn.c_acctbal,
+    "n_name": $ocn.n_name,
+    "c_address": $ocn.c_address,
+    "c_phone": $ocn.c_phone,
+    "c_comment": $ocn.c_comment,
+    "l_extendedprice": $l.l_extendedprice,
+    "l_discount": $l.l_discount
+  }
+)
+group by $c_custkey:=$locn.c_custkey,
+    $c_name:=$locn.c_name,
+    $c_acctbal:=$locn.c_acctbal, $c_phone:=$locn.c_phone,
+    $n_name:=$locn.n_name, $c_address:=$locn.c_address, $c_comment:=$locn.c_comment
+    with $locn
+with $revenue := sum(from $i in $locn select $i.l_extendedprice * (1 - $i.l_discount))
+order by $revenue desc
+limit 20
+select {
+  "c_custkey": $c_custkey,
+  "c_name": $c_name,
+  "revenue": $revenue,
+  "c_acctbal": $c_acctbal,
+  "n_name": $n_name,
+  "c_address": $c_address,
+  "c_phone": $c_phone,
+  "c_comment": $c_comment
+}
+
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.1.ddl.aql
new file mode 100644
index 0000000..54da16a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int64,
+  l_partkey: int64,
+  l_suppkey: int64,
+  l_linenumber: int64,
+  l_quantity: int64,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int64,
+  o_custkey: int64,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int64,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int64,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int64,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int64,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int64,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int64,
+  n_name: string,
+  n_regionkey: int64,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int64,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int64,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int64,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int64,
+  ps_suppkey: int64,
+  ps_availqty: int64,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.query.aql
new file mode 100644
index 0000000..61a7f77
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.3.query.aql
@@ -0,0 +1,55 @@
+use dataverse tpch;
+
+from $locn in (
+  from $l in dataset('LineItem')
+  from $ocn in (
+    from $o in dataset('Orders')
+    from $c in dataset('Customer')
+    where $c.c_custkey = $o.o_custkey and $o.o_orderdate >= '1993-10-01'
+      and $o.o_orderdate < '1994-01-01'
+    from $n in dataset('Nation')
+    where $c.c_nationkey = $n.n_nationkey
+    select {
+      "c_custkey": $c.c_custkey,
+      "c_name": $c.c_name,
+      "c_acctbal": $c.c_acctbal,
+      "n_name": $n.n_name,
+      "c_address": $c.c_address,
+      "c_phone": $c.c_phone,
+      "c_comment": $c.c_comment,
+      "o_orderkey": $o.o_orderkey
+    }
+  )
+  where $l.l_orderkey = $ocn.o_orderkey and $l.l_selectflag = 'R'
+  select {
+    "c_custkey": $ocn.c_custkey,
+    "c_name": $ocn.c_name,
+    "c_acctbal": $ocn.c_acctbal,
+    "n_name": $ocn.n_name,
+    "c_address": $ocn.c_address,
+    "c_phone": $ocn.c_phone,
+    "c_comment": $ocn.c_comment,
+    "l_extendedprice": $l.l_extendedprice,
+    "l_discount": $l.l_discount
+  }
+)
+group by $c_custkey:=$locn.c_custkey,
+    $c_name:=$locn.c_name,
+    $c_acctbal:=$locn.c_acctbal, $c_phone:=$locn.c_phone,
+    $n_name:=$locn.n_name, $c_address:=$locn.c_address, $c_comment:=$locn.c_comment
+    with $locn
+with $revenue := sum(from $i in $locn select $i.l_extendedprice * (1 - $i.l_discount))
+order by $revenue desc
+limit 20
+select {
+  "c_custkey": $c_custkey,
+  "c_name": $c_name,
+  "revenue": $revenue,
+  "c_acctbal": $c_acctbal,
+  "n_name": $n_name,
+  "c_address": $c_address,
+  "c_phone": $c_phone,
+  "c_comment": $c_comment
+}
+
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.2.update.aql
new file mode 100644
index 0000000..743fcf2
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.2.update.aql
@@ -0,0 +1,33 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.3.query.aql
new file mode 100644
index 0000000..19b7fad
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q11_important_stock/q11_important_stock.3.query.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+with $sum := sum (
+  from $ps in dataset('Partsupp')
+  from $sn in (
+    from $s in dataset('Supplier')
+    from $n in dataset('Nation')
+    where $s.s_nationkey = $n.n_nationkey
+    select { "s_suppkey": $s.s_suppkey }
+  )
+  where $ps.ps_suppkey = $sn.s_suppkey
+  select $ps.ps_supplycost * $ps.ps_availqty
+)
+from $t1 in (
+  from $ps in dataset('Partsupp')
+  from $sn in (
+    from $s in dataset('Supplier')
+    from $n in dataset('Nation')
+    where $s.s_nationkey = $n.n_nationkey
+    select { "s_suppkey": $s.s_suppkey }
+  )
+  where $ps.ps_suppkey = $sn.s_suppkey
+  group by $ps_partkey := $ps.ps_partkey with $ps
+  select {
+    "ps_partkey": $ps_partkey,
+    "part_value": sum(from $i in $ps select $i.ps_supplycost * $i.ps_availqty)
+  }
+)
+where $t1.part_value > $sum * 0.00001
+order by $t1.part_value desc
+select {
+  "partkey": $t1.ps_partkey,
+  "part_value": $t1.part_value
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.3.query.aql
new file mode 100644
index 0000000..34c6561
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q12_shipping/q12_shipping.3.query.aql
@@ -0,0 +1,27 @@
+use dataverse tpch;
+
+from $l in dataset('LineItem')
+from $o in dataset('Orders')
+where $o.o_orderkey = $l.l_orderkey
+  and $l.l_commitdate < $l.l_receiptdate
+  and $l.l_shipdate < $l.l_commitdate
+  and $l.l_receiptdate >= '1994-01-01'
+  and $l.l_receiptdate < '1995-01-01'
+  and ($l.l_shipmode = 'MAIL' or $l.l_shipmode = 'SHIP')
+group by $l_shipmode := $l.l_shipmode with $o
+order by $l_shipmode
+select {
+  "l_shipmode": $l_shipmode,
+  "high_line_count": sum(
+    from $i in $o
+    select
+      switch-case($i.o_orderpriority ='1-URGENT' or $i.o_orderpriority ='2-HIGH',
+                  true, 1, false, 0)
+  ),
+  "low_line_count": sum(
+    from $i in $o
+    select switch-case($i.o_orderpriority ='1-URGENT' or $i.o_orderpriority ='2-HIGH',
+                       true, 0, false, 1)
+  )
+}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.aql
new file mode 100644
index 0000000..ce7ce39
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.aql
@@ -0,0 +1,29 @@
+use dataverse tpch;
+set import-private-functions 'true';
+
+from $gco in (
+  from $co in (
+    from $c in dataset('Customer')
+    select {
+      "c_custkey": $c.c_custkey,
+      "o_orderkey_count": count(
+        from $o in dataset('Orders')
+        where  $c.c_custkey = $o.o_custkey and not(like($o.o_comment,'%special%requests%'))
+        select $o.o_orderkey
+      )
+    }
+  )
+  group by $c_custkey := $co.c_custkey with $co
+  select {
+    "c_custkey": $c_custkey,
+    "c_count": sum(from $i in $co select $i.o_orderkey_count)
+  }
+)
+group by $c_count := $gco.c_count with $gco
+with $custdist := count($gco)
+order by $custdist desc, $c_count desc
+select {
+  "c_count": $c_count,
+  "custdist": $custdist
+}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.aql
new file mode 100644
index 0000000..5c480db
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.3.query.aql
@@ -0,0 +1,15 @@
+use dataverse tpch;
+
+from $l in dataset('LineItem')
+from $p in dataset('Part')
+where $l.l_partkey = $p.p_partkey
+  and $l.l_shipdate >= '1995-09-01'
+  and $l.l_shipdate < '1995-10-01'
+group by $t:=1 with $l, $p
+select 100.00 * sum(
+  from $i in $l
+  select switch-case(like($i.p_type, 'PROMO%'),
+                     true, $i.l_extendedprice*(1-$i.l_discount),
+                     false, 0.0)
+  ) / sum(from $i in $l select $i.l_extendedprice * (1 - $i.l_discount)
+)
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.3.query.aql
new file mode 100644
index 0000000..f4a3743
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q15_top_supplier/q15_top_supplier.3.query.aql
@@ -0,0 +1,27 @@
+use dataverse tpch;
+
+declare function revenue() {
+  from $l in dataset('LineItem')
+  where $l.l_shipdate >= '1996-01-01' and $l.l_shipdate < '1996-04-01'
+  group by $l_suppkey := $l.l_suppkey with $l
+  select {
+    "supplier_no": $l_suppkey,
+    "total_revenue": sum(from $i in $l select $i.l_extendedprice * (1 - $i.l_discount))
+  }
+}
+
+with $m := max(
+  from $r2 in revenue()
+  select $r2.total_revenue
+)
+
+from $s in dataset('Supplier')
+from $r in revenue()
+where $s.s_suppkey = $r.supplier_no and $r.total_revenue<$m+0.000000001 and $r.total_revenue>$m-0.000000001
+select {
+  "s_suppkey": $s.s_suppkey,
+  "s_name": $s.s_name,
+  "s_address": $s.s_address,
+  "s_phone": $s.s_phone,
+  "total_revenue": $r.total_revenue
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.aql
new file mode 100644
index 0000000..5abc5a4
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.aql
@@ -0,0 +1,48 @@
+use dataverse tpch;
+
+declare function tmp(){
+  from $psp in (
+    from $ps in dataset('Partsupp')
+    from $p in dataset('Part')
+    where $p.p_partkey = $ps.ps_partkey and $p.p_brand != 'Brand#45'
+      and not(like($p.p_type, 'MEDIUM POLISHED%'))
+    select {
+      "p_brand": $p.p_brand,
+      "p_type": $p.p_type,
+      "p_size": $p.p_size,
+      "ps_suppkey": $ps.ps_suppkey
+    }
+  )
+  from $s in dataset('Supplier')
+  where $psp.ps_suppkey = $s.s_suppkey and not(like($s.s_comment, '%Customer%Complaints%'))
+  select {
+   "p_brand": $psp.p_brand,
+   "p_type": $psp.p_type,
+   "p_size": $psp.p_size,
+   "ps_suppkey": $psp.ps_suppkey
+  }
+}
+
+from $t2 in (
+  from $t in tmp()
+  where $t.p_size = 49 or $t.p_size = 14 or $t.p_size = 23
+    or $t.p_size = 45 or $t.p_size = 19 or $t.p_size = 3
+    or $t.p_size = 36 or $t.p_size = 9
+  group by $p_brand1:= $t.p_brand, $p_type1 := $t.p_type,
+    $p_size1:= $t.p_size, $ps_suppkey1:=$t.ps_suppkey with $t
+  select {
+    "p_brand": $p_brand1,
+    "p_type": $p_type1,
+    "p_size": $p_size1,
+    "ps_suppkey": $ps_suppkey1
+  }
+)
+group by $p_brand := $t2.p_brand, $p_type := $t2.p_type, $p_size := $t2.p_size with $t2
+with $supplier_cnt := count(from $i in $t2 select $i.ps_suppkey)
+order by $supplier_cnt desc, $p_brand, $p_type, $p_size
+select {
+  "p_brand": $p_brand,
+  "p_type": $p_type,
+  "p_size": $p_size,
+  "supplier_cnt": $supplier_cnt
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.query.aql
new file mode 100644
index 0000000..e2fed0c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.query.aql
@@ -0,0 +1,19 @@
+use dataverse tpch;
+
+from $l in dataset('LineItem')
+group by $l_partkey := $l.l_partkey with $l
+order by $l_partkey
+select {
+    "t_partkey": $l_partkey,
+    "t_count": count($l),
+    "t_avg_quantity": 0.2 * avg(from $i in $l select $i.l_quantity),
+    "t_max_suppkey": max(from $i in $l select $i.l_suppkey),
+    "t_max_linenumber": max(from $i in $l select $i.l_linenumber),
+    "t_avg_extendedprice": avg(from $i in $l select $i.l_extendedprice),
+    "t_avg_discount": avg(from $i in $l select $i.l_discount),
+    "t_avg_tax": avg(from $i in $l select $i.l_tax),
+    "t_max_shipdate": max(from $i in $l select $i.l_shipdate),
+    "t_min_commitdate": min(from $i in $l select $i.l_commitdate),
+    "t_min_receiptdate": min(from $i in $l select $i.l_receiptdate),
+    "t_max_comment": max(from $i in $l select $i.l_comment)
+}
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.aql
new file mode 100644
index 0000000..0b811aa
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.3.query.aql
@@ -0,0 +1,21 @@
+use dataverse tpch;
+
+declare function tmp(){
+  from $l in dataset('LineItem')
+  group by $l_partkey := $l.l_partkey with $l
+  select {
+    "t_partkey": $l_partkey,
+    "t_avg_quantity": 0.2 * avg(from $i in $l select $i.l_quantity)
+  }
+}
+
+sum(
+  from $l in dataset('LineItem')
+  from $p in dataset('Part')
+  where  $p.p_partkey = $l.l_partkey and $p.p_container = 'MED BOX'
+  from $t in tmp()
+  where $l.l_partkey = $t.t_partkey
+    and $l.l_quantity < $t.t_avg_quantity
+  select $l.l_extendedprice
+)/7.0
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.query.aql
new file mode 100644
index 0000000..69366f5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.3.query.aql
@@ -0,0 +1,29 @@
+use dataverse tpch;
+
+from $c in dataset('Customer')
+from $o in dataset('Orders')
+where $c.c_custkey = $o.o_custkey
+from $t in (
+  from $l in dataset('LineItem')
+  group by $l_orderkey := $l.l_orderkey with $l
+  select {
+    "l_orderkey": $l_orderkey,
+    "t_sum_quantity": sum(from $i in $l select $i.l_quantity)
+  }
+)
+where $o.o_orderkey = $t.l_orderkey and $t.t_sum_quantity > 30
+from $l in dataset('LineItem')
+where $l.l_orderkey = $o.o_orderkey
+group by $c_name := $c.c_name, $c_custkey := $c.c_custkey, $o_orderkey := $o.o_orderkey,
+         $o_orderdate := $o.o_orderdate, $o_totalprice := $o.o_totalprice with $l
+order by $o_totalprice desc, $o_orderdate
+limit 100
+select {
+  "c_name": $c_name,
+  "c_custkey": $c_custkey,
+  "o_orderkey": $o_orderkey,
+  "o_orderdate": $o_orderdate,
+  "o_totalprice": $o_totalprice,
+  "sum_quantity": sum(from $j in $l select $j.l_quantity)
+}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
new file mode 100644
index 0000000..39e8c4f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.3.query.aql
@@ -0,0 +1,33 @@
+use dataverse tpch;
+
+set import-private-functions 'true';
+
+sum(
+  from $l in dataset('LineItem')
+  from $p in dataset('Part')
+  where $p.p_partkey = $l.l_partkey
+    and ( (
+        $p.p_brand = 'Brand#12'
+        and reg-exp($p.p_container,'SM CASE||SM BOX||SM PACK||SM PKG')
+        and $l.l_quantity >= 1 and $l.l_quantity <= 11
+        and $p.p_size >= 1 and $p.p_size <= 5
+        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and $l.l_shipinstruct = 'DELIVER IN PERSON'
+      ) or (
+        $p.p_brand = 'Brand#23'
+        and reg-exp($p.p_container, 'MED BAG||MED BOX||MED PKG||MED PACK')
+        and $l.l_quantity >= 10 and $l.l_quantity <= 20
+        and $p.p_size >= 1 and $p.p_size <= 10
+        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and $l.l_shipinstruct = 'DELIVER IN PERSON'
+      ) or (
+        $p.p_brand = 'Brand#34'
+        and reg-exp($p.p_container, 'LG CASE||LG BOX||LG PACK||LG PKG')
+        and $l.l_quantity >= 20 and $l.l_quantity <= 30
+        and $p.p_size >= 1 and $p.p_size <= 15
+        and reg-exp($l.l_shipmode, 'AIR||AIR REG')
+        and $l.l_shipinstruct = 'DELIVER IN PERSON'
+      )
+    )
+  select $l.l_extendedprice * (1 - $l.l_discount)
+)
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.query.aql
new file mode 100644
index 0000000..ec7d889
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.3.query.aql
@@ -0,0 +1,48 @@
+use dataverse tpch;
+
+from $t3 in (
+  from $t2 in (
+    from $l in dataset('LineItem')
+    group by $l_partkey:=$l.l_partkey, $l_suppkey:=$l.l_suppkey with $l
+    select {
+      "l_partkey": $l_partkey,
+      "l_suppkey": $l_suppkey,
+      "sum_quantity": 0.5 * sum(from $i in $l select $i.l_quantity)
+    }
+  )
+  from $pst1 in (
+    from $ps in dataset('Partsupp')
+    from $t1 in (
+      from $p in dataset('Part')
+      distinct by $p.p_partkey
+      select { "p_partkey": $p.p_partkey }
+    )
+    where $ps.ps_partkey = $t1.p_partkey
+    select {
+      "ps_suppkey": $ps.ps_suppkey,
+      "ps_partkey": $ps.ps_partkey,
+      "ps_availqty": $ps.ps_availqty
+    }
+  )
+  where $pst1.ps_partkey = $t2.l_partkey and $pst1.ps_suppkey = $t2.l_suppkey
+    and $pst1.ps_availqty > $t2.sum_quantity
+  distinct by $pst1.ps_suppkey
+  select { "ps_suppkey": $pst1.ps_suppkey }
+)
+from $t4 in (
+  from $n in dataset('Nation')
+  from $s in dataset('Supplier')
+  where  $s.s_nationkey = $n.n_nationkey
+  select {
+    "s_name": $s.s_name,
+    "s_address": $s.s_address,
+    "s_suppkey": $s.s_suppkey
+  }
+)
+where $t3.ps_suppkey = $t4.s_suppkey
+order by $t4.s_name
+select {
+  "s_name": $t4.s_name,
+  "s_address": $t4.s_address
+}
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.aql
new file mode 100644
index 0000000..e23fcc4
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.3.query.aql
@@ -0,0 +1,76 @@
+use dataverse tpch;
+
+declare function tmp1() {
+  from $l2 in (
+    from $l in dataset('LineItem')
+    group by $l_orderkey1 := $l.l_orderkey, $l_suppkey1 := $l.l_suppkey with $l
+    select {
+      "l_orderkey": $l_orderkey1,
+      "l_suppkey": $l_suppkey1
+    }
+  )
+  group by $l_orderkey := $l2.l_orderkey with $l2
+  select {
+    "l_orderkey": $l_orderkey,
+    "count_suppkey": count(from $i in $l2 select $i.l_suppkey),
+    "max_suppkey": max(from $i in $l2 select $i.l_suppkey)
+  }
+}
+
+declare function tmp2() {
+  from $l2 in (
+    from $l in dataset('LineItem')
+    where $l.l_receiptdate > $l.l_commitdate
+    group by $l_orderkey1 := $l.l_orderkey, $l_suppkey1 := $l.l_suppkey with $l
+    select {
+      "l_orderkey": $l_orderkey1,
+      "l_suppkey": $l_suppkey1
+    }
+  )
+  group by $l_orderkey := $l2.l_orderkey with $l2
+  select {
+    "l_orderkey": $l_orderkey,
+    "count_suppkey": count(from $i in $l2 select $i.l_suppkey),
+    "max_suppkey": max(from $i in $l2 select $i.l_suppkey)
+  }
+}
+
+from $t4 in (
+  from $t3 in (
+    from $l in dataset('LineItem')
+    from $ns in (
+      from $n in dataset('Nation')
+      from $s in dataset('Supplier')
+      where $s.s_nationkey = $n.n_nationkey
+      select {
+        "s_name": $s.s_name,
+        "s_suppkey": $s.s_suppkey
+      }
+    )
+    where $ns.s_suppkey = $l.l_suppkey and $l.l_receiptdate > $l.l_commitdate
+    from $o in dataset('Orders')
+    where $o.o_orderkey = $l.l_orderkey
+    from $t1 in tmp1()
+    where $l.l_orderkey = $t1.l_orderkey
+    select {
+      "s_name": $ns.s_name,
+      "l_orderkey": $t1.l_orderkey,
+      "l_suppkey": $l.l_suppkey}
+  )
+  from $t2 in tmp2()
+  where $t2.count_suppkey >= 0 and $t3.l_orderkey = $t2.l_orderkey
+  select {
+    "s_name": $t3.s_name,
+    "l_suppkey": $t3.l_suppkey,
+    "l_orderkey": $t2.l_orderkey,
+    "count_suppkey": $t2.count_suppkey,
+    "max_suppkey": $t2.max_suppkey
+  }
+)
+group by $s_name := $t4.s_name with $t4
+with $numwait := count($t4)
+order by $numwait desc, $s_name
+select {
+  "s_name": $s_name,
+  "numwait": $numwait
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.aql
new file mode 100644
index 0000000..3c4adc3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.1.ddl.aql
@@ -0,0 +1,107 @@
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Part(PartType)
+  primary key p_partkey;
+create dataset Partsupp(PartSuppType)
+  primary key ps_partkey, ps_suppkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.2.update.aql
new file mode 100644
index 0000000..0615782
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.2.update.aql
@@ -0,0 +1,34 @@
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Part
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Partsupp
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.aql
new file mode 100644
index 0000000..ca7714b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.3.query.aql
@@ -0,0 +1,25 @@
+use dataverse tpch;
+
+declare function q22_customer_tmp() {
+  from $c in dataset('Customer')
+  select {
+    "c_acctbal": $c.c_acctbal,
+    "c_custkey": $c.c_custkey,
+    "cntrycode": substring($c.c_phone, 1, 2)
+  }
+}
+
+with $avg := avg(
+  from $c in dataset('Customer')
+  where $c.c_acctbal > 0.00
+  select $c.c_acctbal
+)
+from $ct in q22_customer_tmp()
+where $ct.c_acctbal > $avg
+group by $cntrycode := $ct.cntrycode with $ct
+order by $cntrycode
+select {
+  "cntrycode": $cntrycode,
+  "numcust": count($ct),
+  "totacctbal": sum(from $i in $ct select $i.c_acctbal)
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.1.ddl.aql
new file mode 100644
index 0000000..8ec1b76
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.1.ddl.aql
@@ -0,0 +1,33 @@
+/*
+ * Description  : This test case is to verify the fix from issue601
+ * https://code.google.com/p/asterixdb/issues/detail?id=601
+ * Expected Res : SUCCESS
+ * Date         : 10th Oct 2014
+ */
+
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: double,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create dataset LineItem(LineItemType)
+  primary key l_orderkey, l_linenumber;
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.2.update.aql
new file mode 100644
index 0000000..ea1b9e1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.2.update.aql
@@ -0,0 +1,12 @@
+/*
+ * Description  : This test case is to verify the fix from issue601
+ * https://code.google.com/p/asterixdb/issues/detail?id=601
+ * Expected Res : SUCCESS
+ * Date         : 10th Oct 2014
+ */
+
+use dataverse tpch;
+
+load dataset LineItem
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")) pre-sorted;
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.3.query.aql
new file mode 100644
index 0000000..51695fc
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue601/query-issue601.3.query.aql
@@ -0,0 +1,15 @@
+/*
+ * Description  : This test case is to verify the fix from issue601
+ * https://code.google.com/p/asterixdb/issues/detail?id=601
+ * Expected Res : SUCCESS
+ * Date         : 10th Oct 2014
+ */
+
+use dataverse tpch;
+
+from $l in dataset('LineItem')
+group by $l_linenumber := $l.l_linenumber with $l
+select {
+  "l_linenumber": $l_linenumber,
+  "count_order": count($l)
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.1.ddl.aql
new file mode 100644
index 0000000..a2457f9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.1.ddl.aql
@@ -0,0 +1,129 @@
+/*
+ * Description  : This test case is to verify the fix from issue638
+ * https://code.google.com/p/asterixdb/issues/detail?id=638
+ * Expected Res : SUCCESS
+ * Date         : 24th Oct. 2014
+ */
+
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type LineItemType as closed {
+  l_orderkey: int32,
+  l_partkey: int32,
+  l_suppkey: int32,
+  l_linenumber: int32,
+  l_quantity: int32,
+  l_extendedprice: double,
+  l_discount: double,
+  l_tax: double,
+  l_selectflag: string,
+  l_linestatus: string,
+  l_shipdate: string,
+  l_commitdate: string,
+  l_receiptdate: string,
+  l_shipinstruct: string,
+  l_shipmode: string,
+  l_comment: string
+}
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+    r_regionkey: int32,
+    r_name: string,
+    r_comment: string
+}
+
+create type PartType as closed {
+  p_partkey: int32,
+  p_name: string,
+  p_mfgr: string,
+  p_brand: string,
+  p_type: string,
+  p_size: int32,
+  p_container: string,
+  p_retailprice: double,
+  p_comment: string
+}
+
+create type PartSuppType as closed {
+  ps_partkey: int32,
+  ps_suppkey: int32,
+  ps_availqty: int32,
+  ps_supplycost: double,
+  ps_comment: string
+}
+
+create external dataset LineItem(LineItemType)
+using localfs
+(("path"="nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Orders(OrderType)
+using localfs
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Supplier(SupplierType)
+using localfs
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Region(RegionType)
+using localfs
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Nation(NationType)
+using localfs
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Part(PartType)
+using localfs
+(("path"="nc1://data/tpch0.001/part.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Partsupp(PartSuppType)
+using localfs
+(("path"="nc1://data/tpch0.001/partsupp.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+create external dataset Customer(CustomerType)
+using localfs
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.2.update.aql
new file mode 100644
index 0000000..7672512
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.2.update.aql
@@ -0,0 +1,6 @@
+/*
+ * Description  : This test case is to verify the fix from issue638
+ * https://code.google.com/p/asterixdb/issues/detail?id=638
+ * Expected Res : SUCCESS
+ * Date         : 24th Oct. 2014
+ */
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.3.query.aql
new file mode 100644
index 0000000..6482dc6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue638/query-issue638.3.query.aql
@@ -0,0 +1,74 @@
+/*
+ * Description  : This test case is to verify the fix from issue638
+ * https://code.google.com/p/asterixdb/issues/detail?id=638
+ * Expected Res : SUCCESS
+ * Date         : 24th Oct. 2014
+ */
+
+use dataverse tpch;
+
+from $profit in (
+  from $o in dataset('Orders')
+  from $l3 in (
+    from $p in dataset('Part')
+    from $l2 in (
+      from $ps in dataset('Partsupp')
+      from $l1 in (
+        from $s1 in (
+          from $s in dataset('Supplier')
+          from $n in dataset('Nation')
+          where $n.n_nationkey = $s.s_nationkey
+          select {
+            "s_suppkey": $s.s_suppkey,
+            "n_name": $n.n_name
+          }
+        )
+        from $l in dataset('LineItem')
+        where $s1.s_suppkey = $l.l_suppkey
+        select  {
+          "l_suppkey": $l.l_suppkey,
+          "l_extendedprice": $l.l_extendedprice,
+          "l_discount": $l.l_discount,
+          "l_quantity": $l.l_quantity,
+          "l_partkey": $l.l_partkey,
+          "l_orderkey": $l.l_orderkey,
+          "n_name": $s1.n_name
+        }
+      )
+      where $ps.ps_suppkey = $l1.l_suppkey and $ps.ps_partkey = $l1.l_partkey
+      select {
+        "l_extendedprice": $l1.l_extendedprice,
+        "l_discount": $l1.l_discount,
+        "l_quantity": $l1.l_quantity,
+        "l_partkey": $l1.l_partkey,
+        "l_orderkey": $l1.l_orderkey,
+        "n_name": $l1.n_name,
+        "ps_supplycost": $ps.ps_supplycost
+      }
+    )
+    where contains($p.p_name, 'green') and $p.p_partkey = $l2.l_partkey
+    select {
+      "l_extendedprice": $l2.l_extendedprice,
+      "l_discount": $l2.l_discount,
+      "l_quantity": $l2.l_quantity,
+      "l_orderkey": $l2.l_orderkey,
+      "n_name": $l2.n_name,
+      "ps_supplycost": $l2.ps_supplycost
+    }
+  )
+  where $o.o_orderkey = $l3.l_orderkey
+  with $amount := $l3.l_extendedprice * (1 - $l3.l_discount) -  $l3.ps_supplycost * $l3.l_quantity
+  with $o_year := get-year($o.o_orderdate)
+  select {
+    "nation": $l3.n_name,
+    "o_year": $o_year,
+    "amount": $amount
+  }
+)
+group by $nation := $profit.nation, $o_year := $profit.o_year with $profit
+order by $nation, $o_year desc
+select {
+  "nation": $nation,
+  "o_year": $o_year,
+  "sum_profit": sum( from $pr in $profit select $pr.amount )
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.1.ddl.aql
new file mode 100644
index 0000000..f538c06
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.1.ddl.aql
@@ -0,0 +1,70 @@
+/*
+ * Description  : This test case is to verify the fix from issue785
+ * https://code.google.com/p/asterixdb/issues/detail?id=785
+ * Expected Res : SUCCESS
+ * Date         : 2nd Oct. 2014
+ */
+
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+  r_regionkey: int32,
+  r_name: string,
+  r_comment: string
+}
+
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+create dataset SelectedNation(NationType)
+  primary key n_nationkey;
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.2.update.aql
new file mode 100644
index 0000000..a8d1228
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.2.update.aql
@@ -0,0 +1,32 @@
+/*
+ * Description  : This test case is to verify the fix from issue785
+ * https://code.google.com/p/asterixdb/issues/detail?id=785
+ * Expected Res : SUCCESS
+ * Date         : 2nd Oct. 2014
+ */
+
+use dataverse tpch;
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset SelectedNation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/selectednation.tbl"),("format"="delimited-text"),("delimiter"="|"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.3.query.aql
new file mode 100644
index 0000000..f45545f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785-2/query-issue785-2.3.query.aql
@@ -0,0 +1,43 @@
+/*
+ * Description  : This test case is to verify the fix from issue785
+ * https://code.google.com/p/asterixdb/issues/detail?id=785
+ * Expected Res : SUCCESS
+ * Date         : 2nd Oct. 2014
+ */
+
+use dataverse tpch;
+
+with $t := from $nation in dataset Nation
+from $sn in dataset SelectedNation
+where $nation.n_nationkey = $sn.n_nationkey  /*+ indexnl */
+select {
+    "n_nationkey": $nation.n_nationkey,
+    "n_name": $nation.n_name
+}
+
+with $X := (
+from $n in $t
+from $customer in dataset Customer
+from $order in dataset Orders
+where $order.o_custkey = $customer.c_custkey
+and  $customer.c_nationkey = $n.n_nationkey
+group by $orderdate := $order.o_orderdate, $nation_key := $n.n_nationkey with $order
+with $sum := sum(from $o in $order select $o.o_totalprice)
+select {
+    "nation_key": $nation_key,
+    "order_date": $orderdate,
+    "sum_price": $sum
+})
+
+from $x in $X
+group by $nation_key := $x.nation_key with $x
+select {
+    "nation_key": $nation_key,
+    "sum_price": from $y in $x
+                  order by $y.sum_price desc
+                  limit 3
+                  select {
+                    "orderdate": $y.order_date,
+                    "sum_price": $y.sum_price
+                  }
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.1.ddl.aql
new file mode 100644
index 0000000..f538c06
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.1.ddl.aql
@@ -0,0 +1,70 @@
+/*
+ * Description  : This test case is to verify the fix from issue785
+ * https://code.google.com/p/asterixdb/issues/detail?id=785
+ * Expected Res : SUCCESS
+ * Date         : 2nd Oct. 2014
+ */
+
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+  r_regionkey: int32,
+  r_name: string,
+  r_comment: string
+}
+
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+create dataset SelectedNation(NationType)
+  primary key n_nationkey;
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.2.update.aql
new file mode 100644
index 0000000..a8d1228
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.2.update.aql
@@ -0,0 +1,32 @@
+/*
+ * Description  : This test case is to verify the fix from issue785
+ * https://code.google.com/p/asterixdb/issues/detail?id=785
+ * Expected Res : SUCCESS
+ * Date         : 2nd Oct. 2014
+ */
+
+use dataverse tpch;
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset SelectedNation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/selectednation.tbl"),("format"="delimited-text"),("delimiter"="|"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.3.query.aql
new file mode 100644
index 0000000..baf3e73
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue785/query-issue785.3.query.aql
@@ -0,0 +1,35 @@
+/*
+ * Description  : This test case is to verify the fix from issue785
+ * https://code.google.com/p/asterixdb/issues/detail?id=785
+ * Expected Res : SUCCESS
+ * Date         : 2nd Oct. 2014
+ */
+
+use dataverse tpch;
+
+from $x in (
+  from $n in dataset Nation
+  from $customer in dataset Customer
+  from $order in dataset Orders
+  where $order.o_custkey = $customer.c_custkey
+  and  $customer.c_nationkey = $n.n_nationkey
+  group by $orderdate := $order.o_orderdate, $nation_key := $n.n_nationkey with $order
+  select {
+    "nation_key": $nation_key,
+    "order_date": $orderdate,
+    "sum_price": sum(from $o in $order select $o.o_totalprice)
+  }
+)
+group by $nation_key := $x.nation_key with $x
+select {
+     "nation_key": $nation_key,
+     "sum_price": from $i in $x
+                  group by $od := $i.order_date with $i
+                  with $sum := sum(from $s in $i select $s.sum_price)
+                  order by $sum desc
+                  limit 3
+                  select{
+                      "orderdate": $od,
+                      "sum_price": $sum
+                  }
+}
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.1.ddl.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.1.ddl.aql
new file mode 100644
index 0000000..cf123bd
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.1.ddl.aql
@@ -0,0 +1,70 @@
+/*
+ * Description  : This test case is to verify the fix from issue786
+ * https://code.google.com/p/asterixdb/issues/detail?id=786
+ * Expected Res : SUCCESS
+ * Date         : 10th Oct. 2014
+ */
+
+drop dataverse tpch if exists;
+create dataverse tpch;
+
+use dataverse tpch;
+
+create type OrderType as closed {
+  o_orderkey: int32,
+  o_custkey: int32,
+  o_orderstatus: string,
+  o_totalprice: double,
+  o_orderdate: string,
+  o_orderpriority: string,
+  o_clerk: string,
+  o_shippriority: int32,
+  o_comment: string
+}
+
+create type CustomerType as closed {
+  c_custkey: int32,
+  c_name: string,
+  c_address: string,
+  c_nationkey: int32,
+  c_phone: string,
+  c_acctbal: double,
+  c_mktsegment: string,
+  c_comment: string
+}
+
+create type SupplierType as closed {
+  s_suppkey: int32,
+  s_name: string,
+  s_address: string,
+  s_nationkey: int32,
+  s_phone: string,
+  s_acctbal: double,
+  s_comment: string
+}
+
+create type NationType as closed {
+  n_nationkey: int32,
+  n_name: string,
+  n_regionkey: int32,
+  n_comment: string
+}
+
+create type RegionType as closed {
+  r_regionkey: int32,
+  r_name: string,
+  r_comment: string
+}
+
+create dataset Orders(OrderType)
+  primary key o_orderkey;
+create dataset Supplier(SupplierType)
+  primary key s_suppkey;
+create dataset Region(RegionType)
+  primary key r_regionkey;
+create dataset Nation(NationType)
+  primary key n_nationkey;
+create dataset Customer(CustomerType)
+  primary key c_custkey;
+create dataset SelectedNation(NationType)
+  primary key n_nationkey;
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.2.update.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.2.update.aql
new file mode 100644
index 0000000..f58db70
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.2.update.aql
@@ -0,0 +1,32 @@
+/*
+ * Description  : This test case is to verify the fix from issue786
+ * https://code.google.com/p/asterixdb/issues/detail?id=786
+ * Expected Res : SUCCESS
+ * Date         : 10th Oct. 2014
+ */
+
+use dataverse tpch;
+
+load dataset Orders
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Supplier
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/supplier.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Region
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/region.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Nation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/nation.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset Customer
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/customer.tbl"),("format"="delimited-text"),("delimiter"="|"));
+
+load dataset SelectedNation
+using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="nc1://data/tpch0.001/selectednation.tbl"),("format"="delimited-text"),("delimiter"="|"));
diff --git a/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.3.query.aql b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.3.query.aql
new file mode 100644
index 0000000..cea218b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/tpch-sql-like/query-issue786/query-issue786.3.query.aql
@@ -0,0 +1,28 @@
+/*
+ * Description  : This test case is to verify the fix from issue786
+ * https://code.google.com/p/asterixdb/issues/detail?id=786
+ * Expected Res : SUCCESS
+ * Date         : 10th Oct. 2014
+ */
+
+use dataverse tpch;
+
+from $nation in dataset Nation
+from $sn in dataset SelectedNation
+where $nation.n_nationkey = $sn.sn_nationkey  /*+ indexnl */
+select {
+  "nation_key": $nation.n_nationkey,
+  "name": $nation.n_name,
+  "aggregates": from $order in dataset Orders
+                from $customer in dataset Customer
+                where $order.o_custkey = $customer.c_custkey
+                and  $customer.c_nationkey = $nation.n_nationkey
+                group by $orderdate := $order.o_orderdate with $order
+                with $sum := sum(from $o in $order select $o.o_totalprice)
+                order by $sum desc
+                limit 3
+                select {
+                  "order_date": $orderdate,
+                  "sum_price": $sum
+                }
+}
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.1.adm
new file mode 100644
index 0000000..9a9ee67
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q01_pricing_summary_report_nt/q01_pricing_summary_report_nt.1.adm
@@ -0,0 +1,5 @@
+[ { "l_returnflag": "A", "l_linestatus": "F", "sum_qty": 37474.0d, "sum_base_price": 3.7569624640000015E7d, "sum_disc_price": 3.567619209699997E7d, "sum_charge": 3.7101416222424E7d, "ave_qty": 25.354533152909337d, "ave_price": 25419.231826792973d, "ave_disc": 0.05086603518267936d, "count_order": 1478i64 }
+, { "l_returnflag": "N", "l_linestatus": "F", "sum_qty": 1041.0d, "sum_base_price": 1041301.0700000001d, "sum_disc_price": 999060.898d, "sum_charge": 1036450.8022800002d, "ave_qty": 27.394736842105264d, "ave_price": 27402.659736842106d, "ave_disc": 0.04289473684210526d, "count_order": 38i64 }
+, { "l_returnflag": "N", "l_linestatus": "O", "sum_qty": 75168.0d, "sum_base_price": 7.538495537000003E7d, "sum_disc_price": 7.165316630340004E7d, "sum_charge": 7.449879813307303E7d, "ave_qty": 25.558653519211152d, "ave_price": 25632.422771166282d, "ave_disc": 0.04969738184291074d, "count_order": 2941i64 }
+, { "l_returnflag": "R", "l_linestatus": "F", "sum_qty": 36511.0d, "sum_base_price": 3.657084124000002E7d, "sum_disc_price": 3.473847287579997E7d, "sum_charge": 3.616906011219299E7d, "ave_qty": 25.059025394646532d, "ave_price": 25100.09693891559d, "ave_disc": 0.05002745367192867d, "count_order": 1457i64 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.1.adm
new file mode 100644
index 0000000..e22c63e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q02_minimum_cost_supplier/q02_minimum_cost_supplier.1.adm
@@ -0,0 +1,14 @@
+[ { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 2, "p_mfgr": "Manufacturer#1", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 4, "p_mfgr": "Manufacturer#3", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 22, "p_mfgr": "Manufacturer#4", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 35, "p_mfgr": "Manufacturer#4", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 38, "p_mfgr": "Manufacturer#4", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 62, "p_mfgr": "Manufacturer#3", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 79, "p_mfgr": "Manufacturer#4", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 94, "p_mfgr": "Manufacturer#3", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 102, "p_mfgr": "Manufacturer#3", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 106, "p_mfgr": "Manufacturer#3", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 131, "p_mfgr": "Manufacturer#5", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 159, "p_mfgr": "Manufacturer#4", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+, { "s_acctbal": 6820.35d, "s_name": "Supplier#000000007", "n_name": "UNITED KINGDOM", "p_partkey": 193, "p_mfgr": "Manufacturer#4", "s_address": "s,4TicNGB4uO6PaSqNBUq", "s_phone": "33-990-965-2201", "s_comment": "s unwind silently furiously regular courts. final requests are deposits. requests wake quietly blit" }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.1.adm
new file mode 100644
index 0000000..58b94c9
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q03_shipping_priority_nt/q03_shipping_priority_nt.1.adm
@@ -0,0 +1,9 @@
+[ { "l_orderkey": 1637, "revenue": 164224.9253d, "o_orderdate": "1995-02-08", "o_shippriority": 0 }
+, { "l_orderkey": 5191, "revenue": 49378.309400000006d, "o_orderdate": "1994-12-11", "o_shippriority": 0 }
+, { "l_orderkey": 742, "revenue": 43728.048d, "o_orderdate": "1994-12-23", "o_shippriority": 0 }
+, { "l_orderkey": 3492, "revenue": 43716.072400000005d, "o_orderdate": "1994-11-24", "o_shippriority": 0 }
+, { "l_orderkey": 2883, "revenue": 36666.9612d, "o_orderdate": "1995-01-23", "o_shippriority": 0 }
+, { "l_orderkey": 998, "revenue": 11785.548600000002d, "o_orderdate": "1994-11-26", "o_shippriority": 0 }
+, { "l_orderkey": 3430, "revenue": 4726.6775d, "o_orderdate": "1994-12-12", "o_shippriority": 0 }
+, { "l_orderkey": 4423, "revenue": 3055.9365d, "o_orderdate": "1995-02-17", "o_shippriority": 0 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q04_order_priority/q04_order_priority.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q04_order_priority/q04_order_priority.1.adm
new file mode 100644
index 0000000..eb1df68
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q04_order_priority/q04_order_priority.1.adm
@@ -0,0 +1,6 @@
+[ { "order_priority": "1-URGENT", "count": 9i64 }
+, { "order_priority": "2-HIGH", "count": 7i64 }
+, { "order_priority": "3-MEDIUM", "count": 9i64 }
+, { "order_priority": "4-NOT SPECIFIED", "count": 8i64 }
+, { "order_priority": "5-LOW", "count": 12i64 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.1.adm
new file mode 100644
index 0000000..401aef5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q05_local_supplier_volume/q05_local_supplier_volume.1.adm
@@ -0,0 +1,9 @@
+[ { "n_name": "PERU", "revenue": 1099912.8209000002d }
+, { "n_name": "MOROCCO", "revenue": 520107.17919999996d }
+, { "n_name": "IRAN", "revenue": 375610.964d }
+, { "n_name": "IRAQ", "revenue": 364417.398d }
+, { "n_name": "ETHIOPIA", "revenue": 253825.76219999997d }
+, { "n_name": "ARGENTINA", "revenue": 102659.0106d }
+, { "n_name": "UNITED KINGDOM", "revenue": 61065.8711d }
+, { "n_name": "KENYA", "revenue": 29679.393200000002d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.1.adm
new file mode 100644
index 0000000..bb99d4c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q06_forecast_revenue_change/q06_forecast_revenue_change.1.adm
@@ -0,0 +1,2 @@
+[ { "revenue": 77949.9186d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.1.adm
new file mode 100644
index 0000000..1f3020f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q07_volume_shipping/q07_volume_shipping.1.adm
@@ -0,0 +1,38 @@
+[ { "supp_nation": "ARGENTINA", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 63089.1006d }
+, { "supp_nation": "ARGENTINA", "cust_nation": "GERMANY", "l_year": 1993, "revenue": 64024.4532d }
+, { "supp_nation": "ARGENTINA", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 32719.877199999995d }
+, { "supp_nation": "ARGENTINA", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 63729.862400000005d }
+, { "supp_nation": "ARGENTINA", "cust_nation": "GERMANY", "l_year": 1996, "revenue": 1801.8198d }
+, { "supp_nation": "ETHIOPIA", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 74693.317d }
+, { "supp_nation": "ETHIOPIA", "cust_nation": "GERMANY", "l_year": 1993, "revenue": 13733.706600000001d }
+, { "supp_nation": "ETHIOPIA", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 83631.40359999999d }
+, { "supp_nation": "ETHIOPIA", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 69329.67199999999d }
+, { "supp_nation": "ETHIOPIA", "cust_nation": "GERMANY", "l_year": 1996, "revenue": 42017.435999999994d }
+, { "supp_nation": "IRAN", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 38014.335399999996d }
+, { "supp_nation": "IRAN", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 252152.5927d }
+, { "supp_nation": "IRAN", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 9106.957199999999d }
+, { "supp_nation": "IRAQ", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 68040.7747d }
+, { "supp_nation": "IRAQ", "cust_nation": "GERMANY", "l_year": 1993, "revenue": 3676.8004d }
+, { "supp_nation": "IRAQ", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 85948.85280000001d }
+, { "supp_nation": "IRAQ", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 66380.2488d }
+, { "supp_nation": "KENYA", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 77164.5422d }
+, { "supp_nation": "KENYA", "cust_nation": "GERMANY", "l_year": 1993, "revenue": 63792.8736d }
+, { "supp_nation": "KENYA", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 74537.6256d }
+, { "supp_nation": "KENYA", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 37851.309d }
+, { "supp_nation": "KENYA", "cust_nation": "GERMANY", "l_year": 1996, "revenue": 18467.316d }
+, { "supp_nation": "MOROCCO", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 89669.69080000001d }
+, { "supp_nation": "MOROCCO", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 173726.0087d }
+, { "supp_nation": "MOROCCO", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 37169.8497d }
+, { "supp_nation": "PERU", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 226624.7652d }
+, { "supp_nation": "PERU", "cust_nation": "GERMANY", "l_year": 1993, "revenue": 58359.3076d }
+, { "supp_nation": "PERU", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 345376.29829999997d }
+, { "supp_nation": "PERU", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 52968.9424d }
+, { "supp_nation": "PERU", "cust_nation": "GERMANY", "l_year": 1996, "revenue": 7960.72d }
+, { "supp_nation": "UNITED KINGDOM", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 100143.32139999999d }
+, { "supp_nation": "UNITED KINGDOM", "cust_nation": "GERMANY", "l_year": 1993, "revenue": 41582.5227d }
+, { "supp_nation": "UNITED KINGDOM", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 164740.32710000002d }
+, { "supp_nation": "UNITED KINGDOM", "cust_nation": "GERMANY", "l_year": 1996, "revenue": 50909.551999999996d }
+, { "supp_nation": "UNITED STATES", "cust_nation": "GERMANY", "l_year": 1992, "revenue": 52480.9528d }
+, { "supp_nation": "UNITED STATES", "cust_nation": "GERMANY", "l_year": 1994, "revenue": 115566.8388d }
+, { "supp_nation": "UNITED STATES", "cust_nation": "GERMANY", "l_year": 1995, "revenue": 80489.69949999999d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q08_national_market_share/q08_national_market_share.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q08_national_market_share/q08_national_market_share.1.adm
new file mode 100644
index 0000000..69a2b36
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q08_national_market_share/q08_national_market_share.1.adm
@@ -0,0 +1,3 @@
+[ { "year": 1995, "mkt_share": 0.0d }
+, { "year": 1996, "mkt_share": 0.0d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.1.adm
new file mode 100644
index 0000000..d13d4f5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q09_product_type_profit_nt/q09_product_type_profit_nt.1.adm
@@ -0,0 +1,60 @@
+[ { "nation": "ARGENTINA", "o_year": 1997, "sum_profit": 18247.873399999993d }
+, { "nation": "ARGENTINA", "o_year": 1996, "sum_profit": 7731.089399999995d }
+, { "nation": "ARGENTINA", "o_year": 1995, "sum_profit": 134490.5697d }
+, { "nation": "ARGENTINA", "o_year": 1994, "sum_profit": 36767.101500000004d }
+, { "nation": "ARGENTINA", "o_year": 1993, "sum_profit": 35857.08d }
+, { "nation": "ARGENTINA", "o_year": 1992, "sum_profit": 35740.0d }
+, { "nation": "ETHIOPIA", "o_year": 1998, "sum_profit": 2758.7801999999992d }
+, { "nation": "ETHIOPIA", "o_year": 1997, "sum_profit": 19419.294599999994d }
+, { "nation": "ETHIOPIA", "o_year": 1995, "sum_profit": 51231.87439999999d }
+, { "nation": "ETHIOPIA", "o_year": 1994, "sum_profit": 3578.9478999999974d }
+, { "nation": "ETHIOPIA", "o_year": 1992, "sum_profit": 1525.8234999999986d }
+, { "nation": "IRAN", "o_year": 1998, "sum_profit": 37817.229600000006d }
+, { "nation": "IRAN", "o_year": 1997, "sum_profit": 52643.77359999999d }
+, { "nation": "IRAN", "o_year": 1996, "sum_profit": 70143.77609999999d }
+, { "nation": "IRAN", "o_year": 1995, "sum_profit": 84094.58260000001d }
+, { "nation": "IRAN", "o_year": 1994, "sum_profit": 18140.925599999995d }
+, { "nation": "IRAN", "o_year": 1993, "sum_profit": 78655.1676d }
+, { "nation": "IRAN", "o_year": 1992, "sum_profit": 87142.2396d }
+, { "nation": "IRAQ", "o_year": 1998, "sum_profit": 22860.8082d }
+, { "nation": "IRAQ", "o_year": 1997, "sum_profit": 93676.24359999999d }
+, { "nation": "IRAQ", "o_year": 1996, "sum_profit": 45103.3242d }
+, { "nation": "IRAQ", "o_year": 1994, "sum_profit": 36010.728599999995d }
+, { "nation": "IRAQ", "o_year": 1993, "sum_profit": 33221.9399d }
+, { "nation": "IRAQ", "o_year": 1992, "sum_profit": 47755.05900000001d }
+, { "nation": "KENYA", "o_year": 1998, "sum_profit": 44194.831999999995d }
+, { "nation": "KENYA", "o_year": 1997, "sum_profit": 57578.3626d }
+, { "nation": "KENYA", "o_year": 1996, "sum_profit": 59195.9021d }
+, { "nation": "KENYA", "o_year": 1995, "sum_profit": 79262.6278d }
+, { "nation": "KENYA", "o_year": 1994, "sum_profit": 102360.66609999999d }
+, { "nation": "KENYA", "o_year": 1993, "sum_profit": 128422.01959999999d }
+, { "nation": "KENYA", "o_year": 1992, "sum_profit": 181517.20890000003d }
+, { "nation": "MOROCCO", "o_year": 1998, "sum_profit": 41797.823199999984d }
+, { "nation": "MOROCCO", "o_year": 1997, "sum_profit": 23685.801799999997d }
+, { "nation": "MOROCCO", "o_year": 1996, "sum_profit": 62115.19579999999d }
+, { "nation": "MOROCCO", "o_year": 1995, "sum_profit": 42442.64300000001d }
+, { "nation": "MOROCCO", "o_year": 1994, "sum_profit": 48655.87800000001d }
+, { "nation": "MOROCCO", "o_year": 1993, "sum_profit": 22926.744400000003d }
+, { "nation": "MOROCCO", "o_year": 1992, "sum_profit": 32239.8088d }
+, { "nation": "PERU", "o_year": 1998, "sum_profit": 86999.36459999997d }
+, { "nation": "PERU", "o_year": 1997, "sum_profit": 121110.41070000001d }
+, { "nation": "PERU", "o_year": 1996, "sum_profit": 177040.40759999998d }
+, { "nation": "PERU", "o_year": 1995, "sum_profit": 122247.94519999999d }
+, { "nation": "PERU", "o_year": 1994, "sum_profit": 88046.2533d }
+, { "nation": "PERU", "o_year": 1993, "sum_profit": 49379.813799999996d }
+, { "nation": "PERU", "o_year": 1992, "sum_profit": 80646.86050000001d }
+, { "nation": "UNITED KINGDOM", "o_year": 1998, "sum_profit": 50577.25560000001d }
+, { "nation": "UNITED KINGDOM", "o_year": 1997, "sum_profit": 114288.86049999998d }
+, { "nation": "UNITED KINGDOM", "o_year": 1996, "sum_profit": 147684.46480000002d }
+, { "nation": "UNITED KINGDOM", "o_year": 1995, "sum_profit": 225267.6576d }
+, { "nation": "UNITED KINGDOM", "o_year": 1994, "sum_profit": 140595.58639999997d }
+, { "nation": "UNITED KINGDOM", "o_year": 1993, "sum_profit": 322548.49210000003d }
+, { "nation": "UNITED KINGDOM", "o_year": 1992, "sum_profit": 67747.88279999999d }
+, { "nation": "UNITED STATES", "o_year": 1998, "sum_profit": 3957.0431999999996d }
+, { "nation": "UNITED STATES", "o_year": 1997, "sum_profit": 94729.5704d }
+, { "nation": "UNITED STATES", "o_year": 1996, "sum_profit": 79297.8567d }
+, { "nation": "UNITED STATES", "o_year": 1995, "sum_profit": 62201.23360000001d }
+, { "nation": "UNITED STATES", "o_year": 1994, "sum_profit": 43075.62989999999d }
+, { "nation": "UNITED STATES", "o_year": 1993, "sum_profit": 27168.486199999996d }
+, { "nation": "UNITED STATES", "o_year": 1992, "sum_profit": 34092.366d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q10_returned_item/q10_returned_ite.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q10_returned_item/q10_returned_ite.1.adm
new file mode 100644
index 0000000..01f2321
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q10_returned_item/q10_returned_ite.1.adm
@@ -0,0 +1,21 @@
+[ { "c_custkey": 121, "c_name": "Customer#000000121", "revenue": 282635.1719d, "c_acctbal": 6428.32d, "n_name": "PERU", "c_address": "tv nCR2YKupGN73mQudO", "c_phone": "27-411-990-2959", "c_comment": "uriously stealthy ideas. carefully final courts use carefully" }
+, { "c_custkey": 124, "c_name": "Customer#000000124", "revenue": 222182.5188d, "c_acctbal": 1842.49d, "n_name": "CHINA", "c_address": "aTbyVAW5tCd,v09O", "c_phone": "28-183-750-7809", "c_comment": "le fluffily even dependencies. quietly s" }
+, { "c_custkey": 106, "c_name": "Customer#000000106", "revenue": 190241.3334d, "c_acctbal": 3288.42d, "n_name": "ARGENTINA", "c_address": "xGCOEAUjUNG", "c_phone": "11-751-989-4627", "c_comment": "lose slyly. ironic accounts along the evenly regular theodolites wake about the special, final gifts. " }
+, { "c_custkey": 16, "c_name": "Customer#000000016", "revenue": 161422.04609999998d, "c_acctbal": 4681.03d, "n_name": "IRAN", "c_address": "cYiaeMLZSMAOQ2 d0W,", "c_phone": "20-781-609-3107", "c_comment": "kly silent courts. thinly regular theodolites sleep fluffily after " }
+, { "c_custkey": 44, "c_name": "Customer#000000044", "revenue": 149364.5652d, "c_acctbal": 7315.94d, "n_name": "MOZAMBIQUE", "c_address": "Oi,dOSPwDu4jo4x,,P85E0dmhZGvNtBwi", "c_phone": "26-190-260-5375", "c_comment": "r requests around the unusual, bold a" }
+, { "c_custkey": 71, "c_name": "Customer#000000071", "revenue": 129481.02450000001d, "c_acctbal": -611.19d, "n_name": "GERMANY", "c_address": "TlGalgdXWBmMV,6agLyWYDyIz9MKzcY8gl,w6t1B", "c_phone": "17-710-812-5403", "c_comment": "g courts across the regular, final pinto beans are blithely pending ac" }
+, { "c_custkey": 89, "c_name": "Customer#000000089", "revenue": 121663.1243d, "c_acctbal": 1530.76d, "n_name": "KENYA", "c_address": "dtR, y9JQWUO6FoJExyp8whOU", "c_phone": "24-394-451-5404", "c_comment": "counts are slyly beyond the slyly final accounts. quickly final ideas wake. r" }
+, { "c_custkey": 112, "c_name": "Customer#000000112", "revenue": 111137.7141d, "c_acctbal": 2953.35d, "n_name": "ROMANIA", "c_address": "RcfgG3bO7QeCnfjqJT1", "c_phone": "29-233-262-8382", "c_comment": "rmanently unusual multipliers. blithely ruthless deposits are furiously along the" }
+, { "c_custkey": 62, "c_name": "Customer#000000062", "revenue": 106368.0153d, "c_acctbal": 595.61d, "n_name": "GERMANY", "c_address": "upJK2Dnw13,", "c_phone": "17-361-978-7059", "c_comment": "kly special dolphins. pinto beans are slyly. quickly regular accounts are furiously a" }
+, { "c_custkey": 146, "c_name": "Customer#000000146", "revenue": 103265.98879999999d, "c_acctbal": 3328.68d, "n_name": "CANADA", "c_address": "GdxkdXG9u7iyI1,,y5tq4ZyrcEy", "c_phone": "13-835-723-3223", "c_comment": "ffily regular dinos are slyly unusual requests. slyly specia" }
+, { "c_custkey": 19, "c_name": "Customer#000000019", "revenue": 99306.0127d, "c_acctbal": 8914.71d, "n_name": "CHINA", "c_address": "uc,3bHIx84H,wdrmLOjVsiqXCq2tr", "c_phone": "28-396-526-5053", "c_comment": " nag. furiously careful packages are slyly at the accounts. furiously regular in" }
+, { "c_custkey": 145, "c_name": "Customer#000000145", "revenue": 99256.9018d, "c_acctbal": 9748.93d, "n_name": "JORDAN", "c_address": "kQjHmt2kcec cy3hfMh969u", "c_phone": "23-562-444-8454", "c_comment": "ests? express, express instructions use. blithely fina" }
+, { "c_custkey": 103, "c_name": "Customer#000000103", "revenue": 97311.77240000002d, "c_acctbal": 2757.45d, "n_name": "INDONESIA", "c_address": "8KIsQX4LJ7QMsj6DrtFtXu0nUEdV,8a", "c_phone": "19-216-107-2107", "c_comment": "furiously pending notornis boost slyly around the blithely ironic ideas? final, even instructions cajole fl" }
+, { "c_custkey": 136, "c_name": "Customer#000000136", "revenue": 95855.39799999999d, "c_acctbal": -842.39d, "n_name": "GERMANY", "c_address": "QoLsJ0v5C1IQbh,DS1", "c_phone": "17-501-210-4726", "c_comment": "ackages sleep ironic, final courts. even requests above the blithely bold requests g" }
+, { "c_custkey": 53, "c_name": "Customer#000000053", "revenue": 92568.9124d, "c_acctbal": 4113.64d, "n_name": "MOROCCO", "c_address": "HnaxHzTfFTZs8MuCpJyTbZ47Cm4wFOOgib", "c_phone": "25-168-852-5363", "c_comment": "ar accounts are. even foxes are blithely. fluffily pending deposits boost" }
+, { "c_custkey": 49, "c_name": "Customer#000000049", "revenue": 90965.7262d, "c_acctbal": 4573.94d, "n_name": "IRAN", "c_address": "cNgAeX7Fqrdf7HQN9EwjUa4nxT,68L FKAxzl", "c_phone": "20-908-631-4424", "c_comment": "nusual foxes! fluffily pending packages maintain to the regular " }
+, { "c_custkey": 37, "c_name": "Customer#000000037", "revenue": 88065.74579999999d, "c_acctbal": -917.75d, "n_name": "INDIA", "c_address": "7EV4Pwh,3SboctTWt", "c_phone": "18-385-235-7162", "c_comment": "ilent packages are carefully among the deposits. furiousl" }
+, { "c_custkey": 82, "c_name": "Customer#000000082", "revenue": 86998.9644d, "c_acctbal": 9468.34d, "n_name": "CHINA", "c_address": "zhG3EZbap4c992Gj3bK,3Ne,Xn", "c_phone": "28-159-442-5305", "c_comment": "s wake. bravely regular accounts are furiously. regula" }
+, { "c_custkey": 125, "c_name": "Customer#000000125", "revenue": 84808.068d, "c_acctbal": -234.12d, "n_name": "ROMANIA", "c_address": ",wSZXdVR xxIIfm9s8ITyLl3kgjT6UC07GY0Y", "c_phone": "29-261-996-3120", "c_comment": "x-ray finally after the packages? regular requests c" }
+, { "c_custkey": 59, "c_name": "Customer#000000059", "revenue": 84655.5711d, "c_acctbal": 3458.6d, "n_name": "ARGENTINA", "c_address": "zLOCP0wh92OtBihgspOGl4", "c_phone": "11-355-584-3112", "c_comment": "ously final packages haggle blithely after the express deposits. furiou" }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.1.adm
new file mode 100644
index 0000000..5fafae7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q10_returned_item_int64/q10_returned_item_int64.1.adm
@@ -0,0 +1,21 @@
+[ { "c_custkey": 121i64, "c_name": "Customer#000000121", "revenue": 282635.1719d, "c_acctbal": 6428.32d, "n_name": "PERU", "c_address": "tv nCR2YKupGN73mQudO", "c_phone": "27-411-990-2959", "c_comment": "uriously stealthy ideas. carefully final courts use carefully" }
+, { "c_custkey": 124i64, "c_name": "Customer#000000124", "revenue": 222182.5188d, "c_acctbal": 1842.49d, "n_name": "CHINA", "c_address": "aTbyVAW5tCd,v09O", "c_phone": "28-183-750-7809", "c_comment": "le fluffily even dependencies. quietly s" }
+, { "c_custkey": 106i64, "c_name": "Customer#000000106", "revenue": 190241.3334d, "c_acctbal": 3288.42d, "n_name": "ARGENTINA", "c_address": "xGCOEAUjUNG", "c_phone": "11-751-989-4627", "c_comment": "lose slyly. ironic accounts along the evenly regular theodolites wake about the special, final gifts. " }
+, { "c_custkey": 16i64, "c_name": "Customer#000000016", "revenue": 161422.04609999998d, "c_acctbal": 4681.03d, "n_name": "IRAN", "c_address": "cYiaeMLZSMAOQ2 d0W,", "c_phone": "20-781-609-3107", "c_comment": "kly silent courts. thinly regular theodolites sleep fluffily after " }
+, { "c_custkey": 44i64, "c_name": "Customer#000000044", "revenue": 149364.5652d, "c_acctbal": 7315.94d, "n_name": "MOZAMBIQUE", "c_address": "Oi,dOSPwDu4jo4x,,P85E0dmhZGvNtBwi", "c_phone": "26-190-260-5375", "c_comment": "r requests around the unusual, bold a" }
+, { "c_custkey": 71i64, "c_name": "Customer#000000071", "revenue": 129481.02450000001d, "c_acctbal": -611.19d, "n_name": "GERMANY", "c_address": "TlGalgdXWBmMV,6agLyWYDyIz9MKzcY8gl,w6t1B", "c_phone": "17-710-812-5403", "c_comment": "g courts across the regular, final pinto beans are blithely pending ac" }
+, { "c_custkey": 89i64, "c_name": "Customer#000000089", "revenue": 121663.1243d, "c_acctbal": 1530.76d, "n_name": "KENYA", "c_address": "dtR, y9JQWUO6FoJExyp8whOU", "c_phone": "24-394-451-5404", "c_comment": "counts are slyly beyond the slyly final accounts. quickly final ideas wake. r" }
+, { "c_custkey": 112i64, "c_name": "Customer#000000112", "revenue": 111137.7141d, "c_acctbal": 2953.35d, "n_name": "ROMANIA", "c_address": "RcfgG3bO7QeCnfjqJT1", "c_phone": "29-233-262-8382", "c_comment": "rmanently unusual multipliers. blithely ruthless deposits are furiously along the" }
+, { "c_custkey": 62i64, "c_name": "Customer#000000062", "revenue": 106368.0153d, "c_acctbal": 595.61d, "n_name": "GERMANY", "c_address": "upJK2Dnw13,", "c_phone": "17-361-978-7059", "c_comment": "kly special dolphins. pinto beans are slyly. quickly regular accounts are furiously a" }
+, { "c_custkey": 146i64, "c_name": "Customer#000000146", "revenue": 103265.98879999999d, "c_acctbal": 3328.68d, "n_name": "CANADA", "c_address": "GdxkdXG9u7iyI1,,y5tq4ZyrcEy", "c_phone": "13-835-723-3223", "c_comment": "ffily regular dinos are slyly unusual requests. slyly specia" }
+, { "c_custkey": 19i64, "c_name": "Customer#000000019", "revenue": 99306.0127d, "c_acctbal": 8914.71d, "n_name": "CHINA", "c_address": "uc,3bHIx84H,wdrmLOjVsiqXCq2tr", "c_phone": "28-396-526-5053", "c_comment": " nag. furiously careful packages are slyly at the accounts. furiously regular in" }
+, { "c_custkey": 145i64, "c_name": "Customer#000000145", "revenue": 99256.9018d, "c_acctbal": 9748.93d, "n_name": "JORDAN", "c_address": "kQjHmt2kcec cy3hfMh969u", "c_phone": "23-562-444-8454", "c_comment": "ests? express, express instructions use. blithely fina" }
+, { "c_custkey": 103i64, "c_name": "Customer#000000103", "revenue": 97311.77240000002d, "c_acctbal": 2757.45d, "n_name": "INDONESIA", "c_address": "8KIsQX4LJ7QMsj6DrtFtXu0nUEdV,8a", "c_phone": "19-216-107-2107", "c_comment": "furiously pending notornis boost slyly around the blithely ironic ideas? final, even instructions cajole fl" }
+, { "c_custkey": 136i64, "c_name": "Customer#000000136", "revenue": 95855.39799999999d, "c_acctbal": -842.39d, "n_name": "GERMANY", "c_address": "QoLsJ0v5C1IQbh,DS1", "c_phone": "17-501-210-4726", "c_comment": "ackages sleep ironic, final courts. even requests above the blithely bold requests g" }
+, { "c_custkey": 53i64, "c_name": "Customer#000000053", "revenue": 92568.9124d, "c_acctbal": 4113.64d, "n_name": "MOROCCO", "c_address": "HnaxHzTfFTZs8MuCpJyTbZ47Cm4wFOOgib", "c_phone": "25-168-852-5363", "c_comment": "ar accounts are. even foxes are blithely. fluffily pending deposits boost" }
+, { "c_custkey": 49i64, "c_name": "Customer#000000049", "revenue": 90965.7262d, "c_acctbal": 4573.94d, "n_name": "IRAN", "c_address": "cNgAeX7Fqrdf7HQN9EwjUa4nxT,68L FKAxzl", "c_phone": "20-908-631-4424", "c_comment": "nusual foxes! fluffily pending packages maintain to the regular " }
+, { "c_custkey": 37i64, "c_name": "Customer#000000037", "revenue": 88065.74579999999d, "c_acctbal": -917.75d, "n_name": "INDIA", "c_address": "7EV4Pwh,3SboctTWt", "c_phone": "18-385-235-7162", "c_comment": "ilent packages are carefully among the deposits. furiousl" }
+, { "c_custkey": 82i64, "c_name": "Customer#000000082", "revenue": 86998.9644d, "c_acctbal": 9468.34d, "n_name": "CHINA", "c_address": "zhG3EZbap4c992Gj3bK,3Ne,Xn", "c_phone": "28-159-442-5305", "c_comment": "s wake. bravely regular accounts are furiously. regula" }
+, { "c_custkey": 125i64, "c_name": "Customer#000000125", "revenue": 84808.068d, "c_acctbal": -234.12d, "n_name": "ROMANIA", "c_address": ",wSZXdVR xxIIfm9s8ITyLl3kgjT6UC07GY0Y", "c_phone": "29-261-996-3120", "c_comment": "x-ray finally after the packages? regular requests c" }
+, { "c_custkey": 59i64, "c_name": "Customer#000000059", "revenue": 84655.5711d, "c_acctbal": 3458.6d, "n_name": "ARGENTINA", "c_address": "zLOCP0wh92OtBihgspOGl4", "c_phone": "11-355-584-3112", "c_comment": "ously final packages haggle blithely after the express deposits. furiou" }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q11_important_stock/q11_important_stock.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q11_important_stock/q11_important_stock.1.adm
new file mode 100644
index 0000000..3ebc424
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q11_important_stock/q11_important_stock.1.adm
@@ -0,0 +1,201 @@
+[ { "partkey": 25, "part_value": 2.832302068E7d }
+, { "partkey": 124, "part_value": 2.59627599E7d }
+, { "partkey": 175, "part_value": 2.385395363E7d }
+, { "partkey": 197, "part_value": 2.248551967E7d }
+, { "partkey": 163, "part_value": 2.099460571E7d }
+, { "partkey": 160, "part_value": 2.00232846E7d }
+, { "partkey": 82, "part_value": 1.991921335E7d }
+, { "partkey": 169, "part_value": 1.898734723E7d }
+, { "partkey": 29, "part_value": 1.867279344E7d }
+, { "partkey": 26, "part_value": 1.861245827E7d }
+, { "partkey": 73, "part_value": 1.827170729E7d }
+, { "partkey": 161, "part_value": 1.7987463009999998E7d }
+, { "partkey": 75, "part_value": 1.7959598009999998E7d }
+, { "partkey": 34, "part_value": 1.778083836E7d }
+, { "partkey": 98, "part_value": 1.7763191509999998E7d }
+, { "partkey": 69, "part_value": 1.728526943E7d }
+, { "partkey": 111, "part_value": 1.7083882619999997E7d }
+, { "partkey": 171, "part_value": 1.635442066E7d }
+, { "partkey": 166, "part_value": 1.6351893740000002E7d }
+, { "partkey": 77, "part_value": 1.598059909E7d }
+, { "partkey": 78, "part_value": 1.58768992E7d }
+, { "partkey": 143, "part_value": 1.585686159E7d }
+, { "partkey": 17, "part_value": 1.547426112E7d }
+, { "partkey": 109, "part_value": 1.5054682620000001E7d }
+, { "partkey": 105, "part_value": 1.5053163809999999E7d }
+, { "partkey": 96, "part_value": 1.495213259E7d }
+, { "partkey": 146, "part_value": 1.481075944E7d }
+, { "partkey": 136, "part_value": 1.465496775E7d }
+, { "partkey": 116, "part_value": 1.4432091339999998E7d }
+, { "partkey": 128, "part_value": 1.4393555259999998E7d }
+, { "partkey": 142, "part_value": 1.422039904E7d }
+, { "partkey": 121, "part_value": 1.420032605E7d }
+, { "partkey": 30, "part_value": 1.416313241E7d }
+, { "partkey": 16, "part_value": 1.413646503E7d }
+, { "partkey": 198, "part_value": 1.413535335E7d }
+, { "partkey": 79, "part_value": 1.38652287E7d }
+, { "partkey": 90, "part_value": 1.373279748E7d }
+, { "partkey": 32, "part_value": 1.369962979E7d }
+, { "partkey": 74, "part_value": 1.338871111E7d }
+, { "partkey": 1, "part_value": 1.337870724E7d }
+, { "partkey": 89, "part_value": 1.337148041E7d }
+, { "partkey": 22, "part_value": 1.3354991740000002E7d }
+, { "partkey": 186, "part_value": 1.317604077E7d }
+, { "partkey": 189, "part_value": 1.305492542E7d }
+, { "partkey": 14, "part_value": 1.299397721E7d }
+, { "partkey": 93, "part_value": 1.299298218E7d }
+, { "partkey": 168, "part_value": 1.299041501E7d }
+, { "partkey": 99, "part_value": 1.2750046790000001E7d }
+, { "partkey": 167, "part_value": 1.268255069E7d }
+, { "partkey": 2, "part_value": 1.258471636E7d }
+, { "partkey": 182, "part_value": 1.256239411E7d }
+, { "partkey": 61, "part_value": 1.253677656E7d }
+, { "partkey": 112, "part_value": 1.234957975E7d }
+, { "partkey": 178, "part_value": 1.2260301739999998E7d }
+, { "partkey": 172, "part_value": 1.219775193E7d }
+, { "partkey": 165, "part_value": 1.219746506E7d }
+, { "partkey": 184, "part_value": 1.216784393E7d }
+, { "partkey": 187, "part_value": 1.214970141E7d }
+, { "partkey": 153, "part_value": 1.2119354219999999E7d }
+, { "partkey": 95, "part_value": 1.20468895E7d }
+, { "partkey": 11, "part_value": 1.2007151559999999E7d }
+, { "partkey": 125, "part_value": 1.2003476109999998E7d }
+, { "partkey": 154, "part_value": 1.185113385E7d }
+, { "partkey": 15, "part_value": 1.1798438790000001E7d }
+, { "partkey": 67, "part_value": 1.178579951E7d }
+, { "partkey": 8, "part_value": 1.1707892620000001E7d }
+, { "partkey": 87, "part_value": 1.168637671E7d }
+, { "partkey": 134, "part_value": 1.1683586929999998E7d }
+, { "partkey": 130, "part_value": 1.1682461489999998E7d }
+, { "partkey": 43, "part_value": 1.161150462E7d }
+, { "partkey": 102, "part_value": 1.151554211E7d }
+, { "partkey": 21, "part_value": 1.141066856E7d }
+, { "partkey": 62, "part_value": 1.138927324E7d }
+, { "partkey": 9, "part_value": 1.126484373E7d }
+, { "partkey": 80, "part_value": 1.118329032E7d }
+, { "partkey": 173, "part_value": 1.102677486E7d }
+, { "partkey": 94, "part_value": 1.092440116E7d }
+, { "partkey": 3, "part_value": 1.075814545E7d }
+, { "partkey": 103, "part_value": 1.06912216E7d }
+, { "partkey": 158, "part_value": 1.067861635E7d }
+, { "partkey": 49, "part_value": 1.06445572E7d }
+, { "partkey": 139, "part_value": 1.044045371E7d }
+, { "partkey": 192, "part_value": 1.035745974E7d }
+, { "partkey": 24, "part_value": 1.033911936E7d }
+, { "partkey": 39, "part_value": 1.03210148E7d }
+, { "partkey": 156, "part_value": 1.014364082E7d }
+, { "partkey": 188, "part_value": 1.011906085E7d }
+, { "partkey": 12, "part_value": 1.01085874E7d }
+, { "partkey": 33, "part_value": 1.005296264E7d }
+, { "partkey": 28, "part_value": 1.005234286E7d }
+, { "partkey": 40, "part_value": 9927827.77d }
+, { "partkey": 199, "part_value": 9907803.559999999d }
+, { "partkey": 193, "part_value": 9869674.77d }
+, { "partkey": 106, "part_value": 9869361.73d }
+, { "partkey": 108, "part_value": 9868370.309999999d }
+, { "partkey": 183, "part_value": 9855564.82d }
+, { "partkey": 70, "part_value": 9700431.94d }
+, { "partkey": 48, "part_value": 9655921.88d }
+, { "partkey": 118, "part_value": 9622756.15d }
+, { "partkey": 13, "part_value": 9592610.32d }
+, { "partkey": 83, "part_value": 9543465.08d }
+, { "partkey": 159, "part_value": 9519909.44d }
+, { "partkey": 147, "part_value": 9513932.18d }
+, { "partkey": 45, "part_value": 9423874.47d }
+, { "partkey": 117, "part_value": 9408426.72d }
+, { "partkey": 135, "part_value": 9311247.280000001d }
+, { "partkey": 185, "part_value": 9305341.780000001d }
+, { "partkey": 131, "part_value": 9223742.49d }
+, { "partkey": 7, "part_value": 9175528.21d }
+, { "partkey": 71, "part_value": 9167712.04d }
+, { "partkey": 100, "part_value": 9131099.530000001d }
+, { "partkey": 76, "part_value": 9092927.11d }
+, { "partkey": 53, "part_value": 8979121.97d }
+, { "partkey": 141, "part_value": 8686511.120000001d }
+, { "partkey": 64, "part_value": 8627897.290000001d }
+, { "partkey": 101, "part_value": 8521762.0d }
+, { "partkey": 176, "part_value": 8510175.88d }
+, { "partkey": 19, "part_value": 8481679.5d }
+, { "partkey": 194, "part_value": 8464559.54d }
+, { "partkey": 91, "part_value": 8460636.52d }
+, { "partkey": 132, "part_value": 8416851.239999998d }
+, { "partkey": 113, "part_value": 8405217.96d }
+, { "partkey": 51, "part_value": 8247118.499999999d }
+, { "partkey": 41, "part_value": 8187897.16d }
+, { "partkey": 55, "part_value": 8092552.890000001d }
+, { "partkey": 72, "part_value": 8007155.3d }
+, { "partkey": 115, "part_value": 7954624.0d }
+, { "partkey": 170, "part_value": 7895241.609999999d }
+, { "partkey": 114, "part_value": 7832023.28d }
+, { "partkey": 37, "part_value": 7809598.659999999d }
+, { "partkey": 54, "part_value": 7578243.79d }
+, { "partkey": 180, "part_value": 7531794.4799999995d }
+, { "partkey": 60, "part_value": 7508961.69d }
+, { "partkey": 31, "part_value": 7433034.240000001d }
+, { "partkey": 35, "part_value": 7132671.49d }
+, { "partkey": 140, "part_value": 7122050.08d }
+, { "partkey": 150, "part_value": 7106237.92d }
+, { "partkey": 107, "part_value": 7082828.68d }
+, { "partkey": 123, "part_value": 7049500.720000001d }
+, { "partkey": 190, "part_value": 7017966.9d }
+, { "partkey": 120, "part_value": 6920857.090000001d }
+, { "partkey": 196, "part_value": 6905182.43d }
+, { "partkey": 177, "part_value": 6887257.27d }
+, { "partkey": 126, "part_value": 6813302.029999999d }
+, { "partkey": 122, "part_value": 6812763.34d }
+, { "partkey": 200, "part_value": 6780024.53d }
+, { "partkey": 157, "part_value": 6766365.680000001d }
+, { "partkey": 63, "part_value": 6724960.14d }
+, { "partkey": 38, "part_value": 6667789.55d }
+, { "partkey": 58, "part_value": 6640619.380000001d }
+, { "partkey": 145, "part_value": 6633786.59d }
+, { "partkey": 144, "part_value": 6546945.92d }
+, { "partkey": 20, "part_value": 6533101.39d }
+, { "partkey": 127, "part_value": 6483139.620000001d }
+, { "partkey": 10, "part_value": 6433776.51d }
+, { "partkey": 47, "part_value": 6407355.369999999d }
+, { "partkey": 191, "part_value": 6347187.43d }
+, { "partkey": 137, "part_value": 6180452.85d }
+, { "partkey": 56, "part_value": 6145826.6d }
+, { "partkey": 104, "part_value": 6134341.85d }
+, { "partkey": 44, "part_value": 6038126.66d }
+, { "partkey": 97, "part_value": 6036047.1899999995d }
+, { "partkey": 181, "part_value": 5853464.149999999d }
+, { "partkey": 162, "part_value": 5829410.54d }
+, { "partkey": 86, "part_value": 5746713.88d }
+, { "partkey": 52, "part_value": 5680644.4799999995d }
+, { "partkey": 155, "part_value": 5552007.57d }
+, { "partkey": 92, "part_value": 5489588.279999999d }
+, { "partkey": 5, "part_value": 5461046.930000001d }
+, { "partkey": 18, "part_value": 5456316.21d }
+, { "partkey": 149, "part_value": 5367514.63d }
+, { "partkey": 110, "part_value": 5261352.11d }
+, { "partkey": 4, "part_value": 5162989.07d }
+, { "partkey": 6, "part_value": 5120392.470000001d }
+, { "partkey": 148, "part_value": 5061589.27d }
+, { "partkey": 42, "part_value": 4957032.47d }
+, { "partkey": 119, "part_value": 4954403.4799999995d }
+, { "partkey": 84, "part_value": 4891082.38d }
+, { "partkey": 65, "part_value": 4834763.09d }
+, { "partkey": 66, "part_value": 4719253.369999999d }
+, { "partkey": 179, "part_value": 4610607.919999999d }
+, { "partkey": 23, "part_value": 4531731.12d }
+, { "partkey": 68, "part_value": 4504770.61d }
+, { "partkey": 27, "part_value": 4371849.52d }
+, { "partkey": 36, "part_value": 4036576.8999999994d }
+, { "partkey": 129, "part_value": 3997604.78d }
+, { "partkey": 195, "part_value": 3817436.31d }
+, { "partkey": 59, "part_value": 3765210.2100000004d }
+, { "partkey": 57, "part_value": 3739347.12d }
+, { "partkey": 138, "part_value": 3567425.75d }
+, { "partkey": 174, "part_value": 3484708.3100000005d }
+, { "partkey": 164, "part_value": 3462215.0d }
+, { "partkey": 81, "part_value": 3421610.42d }
+, { "partkey": 46, "part_value": 3398443.33d }
+, { "partkey": 85, "part_value": 3338711.3899999997d }
+, { "partkey": 50, "part_value": 3145791.9699999997d }
+, { "partkey": 88, "part_value": 3117730.2399999998d }
+, { "partkey": 151, "part_value": 2727444.22d }
+, { "partkey": 152, "part_value": 1837809.1700000002d }
+, { "partkey": 133, "part_value": 1517282.3299999998d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q12_shipping/q12_shipping.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q12_shipping/q12_shipping.1.adm
new file mode 100644
index 0000000..a7f8cab
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q12_shipping/q12_shipping.1.adm
@@ -0,0 +1,3 @@
+[ { "l_shipmode": "MAIL", "high_line_count": 5, "low_line_count": 5 }
+, { "l_shipmode": "SHIP", "high_line_count": 5, "low_line_count": 10 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.1.adm
new file mode 100644
index 0000000..c7e34a3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.1.adm
@@ -0,0 +1,28 @@
+[ { "c_count": 0i64, "custdist": 50i64 }
+, { "c_count": 16i64, "custdist": 8i64 }
+, { "c_count": 17i64, "custdist": 7i64 }
+, { "c_count": 20i64, "custdist": 6i64 }
+, { "c_count": 13i64, "custdist": 6i64 }
+, { "c_count": 12i64, "custdist": 6i64 }
+, { "c_count": 9i64, "custdist": 6i64 }
+, { "c_count": 23i64, "custdist": 5i64 }
+, { "c_count": 14i64, "custdist": 5i64 }
+, { "c_count": 10i64, "custdist": 5i64 }
+, { "c_count": 21i64, "custdist": 4i64 }
+, { "c_count": 18i64, "custdist": 4i64 }
+, { "c_count": 11i64, "custdist": 4i64 }
+, { "c_count": 8i64, "custdist": 4i64 }
+, { "c_count": 7i64, "custdist": 4i64 }
+, { "c_count": 26i64, "custdist": 3i64 }
+, { "c_count": 22i64, "custdist": 3i64 }
+, { "c_count": 6i64, "custdist": 3i64 }
+, { "c_count": 5i64, "custdist": 3i64 }
+, { "c_count": 4i64, "custdist": 3i64 }
+, { "c_count": 29i64, "custdist": 2i64 }
+, { "c_count": 24i64, "custdist": 2i64 }
+, { "c_count": 19i64, "custdist": 2i64 }
+, { "c_count": 15i64, "custdist": 2i64 }
+, { "c_count": 28i64, "custdist": 1i64 }
+, { "c_count": 25i64, "custdist": 1i64 }
+, { "c_count": 3i64, "custdist": 1i64 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.1.adm
new file mode 100644
index 0000000..e7d1f13
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q14_promotion_effect/q14_promotion_effect.1.adm
@@ -0,0 +1,2 @@
+[ 0.0d
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q15_top_supplier/q15_top_supplier.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q15_top_supplier/q15_top_supplier.1.adm
new file mode 100644
index 0000000..474c7c5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q15_top_supplier/q15_top_supplier.1.adm
@@ -0,0 +1,2 @@
+[ { "s_suppkey": 10, "s_name": "Supplier#000000010", "s_address": "Saygah3gYWMp72i PY", "s_phone": "34-852-489-8585", "total_revenue": 797313.3838d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm
new file mode 100644
index 0000000..c3429a8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm
@@ -0,0 +1,35 @@
+[ { "p_brand": "Brand#11", "p_type": "PROMO ANODIZED TIN", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#11", "p_type": "SMALL PLATED COPPER", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#11", "p_type": "STANDARD POLISHED TIN", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#13", "p_type": "MEDIUM ANODIZED STEEL", "p_size": 36, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#13", "p_type": "SMALL BRUSHED NICKEL", "p_size": 19, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#14", "p_type": "SMALL ANODIZED NICKEL", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#15", "p_type": "LARGE ANODIZED BRASS", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#21", "p_type": "LARGE BURNISHED COPPER", "p_size": 19, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#23", "p_type": "ECONOMY BRUSHED COPPER", "p_size": 9, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#24", "p_type": "MEDIUM PLATED STEEL", "p_size": 19, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#25", "p_type": "MEDIUM PLATED BRASS", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#31", "p_type": "ECONOMY PLATED STEEL", "p_size": 23, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#31", "p_type": "PROMO POLISHED TIN", "p_size": 23, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#32", "p_type": "MEDIUM BURNISHED BRASS", "p_size": 49, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#33", "p_type": "LARGE BRUSHED TIN", "p_size": 36, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#33", "p_type": "SMALL BURNISHED NICKEL", "p_size": 3, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#34", "p_type": "LARGE PLATED BRASS", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#34", "p_type": "MEDIUM BRUSHED COPPER", "p_size": 9, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#34", "p_type": "SMALL PLATED BRASS", "p_size": 14, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#35", "p_type": "STANDARD ANODIZED STEEL", "p_size": 23, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#43", "p_type": "MEDIUM ANODIZED BRASS", "p_size": 14, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#43", "p_type": "PROMO POLISHED BRASS", "p_size": 19, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#43", "p_type": "SMALL BRUSHED NICKEL", "p_size": 9, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#44", "p_type": "SMALL PLATED COPPER", "p_size": 19, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#51", "p_type": "ECONOMY POLISHED STEEL", "p_size": 49, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#52", "p_type": "MEDIUM BURNISHED TIN", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#52", "p_type": "SMALL BURNISHED NICKEL", "p_size": 14, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#53", "p_type": "LARGE BURNISHED NICKEL", "p_size": 23, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#53", "p_type": "MEDIUM BRUSHED COPPER", "p_size": 3, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#53", "p_type": "STANDARD PLATED STEEL", "p_size": 45, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#54", "p_type": "ECONOMY ANODIZED BRASS", "p_size": 9, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#55", "p_type": "STANDARD ANODIZED BRASS", "p_size": 36, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#55", "p_type": "STANDARD BRUSHED COPPER", "p_size": 3, "supplier_cnt": 4i64 }
+, { "p_brand": "Brand#25", "p_type": "SMALL BURNISHED COPPER", "p_size": 3, "supplier_cnt": 3i64 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.adm
new file mode 100644
index 0000000..5a801a5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q17_large_gby_variant/q17_large_gby_variant.3.adm
@@ -0,0 +1,201 @@
+[ { "t_partkey": 1, "t_count": 35i64, "t_avg_quantity": 5.28d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 23786.4d, "t_avg_discount": 0.044000000000000004d, "t_avg_tax": 0.049142857142857155d, "t_max_shipdate": "1997-08-08", "t_min_commitdate": "1992-04-02", "t_min_receiptdate": "1992-02-28", "t_max_comment": "y ironic requests. bold, final ideas a" }
+, { "t_partkey": 2, "t_count": 34i64, "t_avg_quantity": 4.347058823529411d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 19605.235294117647d, "t_avg_discount": 0.049705882352941176d, "t_avg_tax": 0.04d, "t_max_shipdate": "1998-05-31", "t_min_commitdate": "1992-07-12", "t_min_receiptdate": "1992-07-08", "t_max_comment": "yly final dolphins? quickly ironic frets" }
+, { "t_partkey": 3, "t_count": 27i64, "t_avg_quantity": 4.896296296296296d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 22106.777777777777d, "t_avg_discount": 0.05481481481481482d, "t_avg_tax": 0.04185185185185186d, "t_max_shipdate": "1998-05-22", "t_min_commitdate": "1992-03-20", "t_min_receiptdate": "1992-05-04", "t_max_comment": "yly blithely pending packages" }
+, { "t_partkey": 4, "t_count": 26i64, "t_avg_quantity": 4.2615384615384615d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 19262.153846153848d, "t_avg_discount": 0.056538461538461544d, "t_avg_tax": 0.04d, "t_max_shipdate": "1998-08-26", "t_min_commitdate": "1992-03-21", "t_min_receiptdate": "1992-05-27", "t_max_comment": "y regular packages haggle furiously alongs" }
+, { "t_partkey": 5, "t_count": 32i64, "t_avg_quantity": 5.4750000000000005d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 24774.375d, "t_avg_discount": 0.04125d, "t_avg_tax": 0.0390625d, "t_max_shipdate": "1998-07-19", "t_min_commitdate": "1992-05-12", "t_min_receiptdate": "1992-05-10", "t_max_comment": "y. careful" }
+, { "t_partkey": 6, "t_count": 34i64, "t_avg_quantity": 5.2058823529411775d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23582.647058823528d, "t_avg_discount": 0.05676470588235293d, "t_avg_tax": 0.04176470588235294d, "t_max_shipdate": "1998-09-05", "t_min_commitdate": "1992-04-24", "t_min_receiptdate": "1992-04-08", "t_max_comment": "yly express " }
+, { "t_partkey": 7, "t_count": 22i64, "t_avg_quantity": 4.7d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 21314.5d, "t_avg_discount": 0.05772727272727273d, "t_avg_tax": 0.041818181818181824d, "t_max_shipdate": "1998-07-27", "t_min_commitdate": "1992-05-31", "t_min_receiptdate": "1992-04-21", "t_max_comment": "ss the ironic, regular asymptotes cajole " }
+, { "t_partkey": 8, "t_count": 24i64, "t_avg_quantity": 4.783333333333334d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 21716.333333333332d, "t_avg_discount": 0.055d, "t_avg_tax": 0.04958333333333333d, "t_max_shipdate": "1998-07-04", "t_min_commitdate": "1992-10-24", "t_min_receiptdate": "1992-10-11", "t_max_comment": "uctions. furiously regular ins" }
+, { "t_partkey": 9, "t_count": 29i64, "t_avg_quantity": 5.331034482758621d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 24229.55172413793d, "t_avg_discount": 0.04206896551724139d, "t_avg_tax": 0.03896551724137932d, "t_max_shipdate": "1998-06-12", "t_min_commitdate": "1992-03-30", "t_min_receiptdate": "1992-05-23", "t_max_comment": "yly ironic" }
+, { "t_partkey": 10, "t_count": 31i64, "t_avg_quantity": 5.509677419354839d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 25069.307741935485d, "t_avg_discount": 0.052903225806451626d, "t_avg_tax": 0.04548387096774194d, "t_max_shipdate": "1998-10-02", "t_min_commitdate": "1992-07-21", "t_min_receiptdate": "1992-05-18", "t_max_comment": "y quickly ironic accounts." }
+, { "t_partkey": 11, "t_count": 28i64, "t_avg_quantity": 5.521428571428572d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 25150.383214285714d, "t_avg_discount": 0.05d, "t_avg_tax": 0.046071428571428576d, "t_max_shipdate": "1998-07-12", "t_min_commitdate": "1992-03-15", "t_min_receiptdate": "1992-02-26", "t_max_comment": "ven dependencies x-ray. quic" }
+, { "t_partkey": 12, "t_count": 24i64, "t_avg_quantity": 4.966666666666667d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 22648.248333333333d, "t_avg_discount": 0.04791666666666667d, "t_avg_tax": 0.05083333333333334d, "t_max_shipdate": "1998-04-14", "t_min_commitdate": "1992-05-03", "t_min_receiptdate": "1992-07-29", "t_max_comment": "xpress grouc" }
+, { "t_partkey": 13, "t_count": 26i64, "t_avg_quantity": 5.038461538461539d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 23000.828846153847d, "t_avg_discount": 0.04153846153846154d, "t_avg_tax": 0.04d, "t_max_shipdate": "1998-10-04", "t_min_commitdate": "1992-03-31", "t_min_receiptdate": "1992-04-21", "t_max_comment": "wake at the carefully speci" }
+, { "t_partkey": 14, "t_count": 25i64, "t_avg_quantity": 4.5840000000000005d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 20949.1092d, "t_avg_discount": 0.055600000000000004d, "t_avg_tax": 0.0436d, "t_max_shipdate": "1998-10-17", "t_min_commitdate": "1992-07-16", "t_min_receiptdate": "1992-08-05", "t_max_comment": "thely. furio" }
+, { "t_partkey": 15, "t_count": 21i64, "t_avg_quantity": 5.133333333333334d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23485.256666666664d, "t_avg_discount": 0.051428571428571435d, "t_avg_tax": 0.03142857142857143d, "t_max_shipdate": "1998-02-14", "t_min_commitdate": "1992-04-01", "t_min_receiptdate": "1992-05-26", "t_max_comment": "ymptotes nag furiously slyly even inst" }
+, { "t_partkey": 16, "t_count": 29i64, "t_avg_quantity": 4.731034482758621d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 21668.37448275862d, "t_avg_discount": 0.049310344827586214d, "t_avg_tax": 0.034482758620689655d, "t_max_shipdate": "1998-11-02", "t_min_commitdate": "1992-08-06", "t_min_receiptdate": "1992-09-12", "t_max_comment": "yly blithely stealthy deposits. carefu" }
+, { "t_partkey": 17, "t_count": 31i64, "t_avg_quantity": 5.270967741935484d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 24167.650645161288d, "t_avg_discount": 0.05387096774193549d, "t_avg_tax": 0.04709677419354839d, "t_max_shipdate": "1998-10-04", "t_min_commitdate": "1992-08-07", "t_min_receiptdate": "1992-08-13", "t_max_comment": "uriously thin pinto beans " }
+, { "t_partkey": 18, "t_count": 32i64, "t_avg_quantity": 5.4437500000000005d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 24987.0846875d, "t_avg_discount": 0.05500000000000001d, "t_avg_tax": 0.039375d, "t_max_shipdate": "1998-11-13", "t_min_commitdate": "1992-04-14", "t_min_receiptdate": "1992-04-13", "t_max_comment": "y special packages. carefully ironic instru" }
+, { "t_partkey": 19, "t_count": 29i64, "t_avg_quantity": 5.151724137931034d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 23672.43d, "t_avg_discount": 0.05275862068965517d, "t_avg_tax": 0.03896551724137932d, "t_max_shipdate": "1998-08-04", "t_min_commitdate": "1992-07-07", "t_min_receiptdate": "1992-08-15", "t_max_comment": "y along the excuses." }
+, { "t_partkey": 20, "t_count": 27i64, "t_avg_quantity": 4.955555555555556d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 22796.05111111111d, "t_avg_discount": 0.042222222222222223d, "t_avg_tax": 0.035555555555555556d, "t_max_shipdate": "1998-06-11", "t_min_commitdate": "1992-07-13", "t_min_receiptdate": "1992-06-21", "t_max_comment": "y. blithely r" }
+, { "t_partkey": 21, "t_count": 26i64, "t_avg_quantity": 4.730769230769231d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 21785.665384615386d, "t_avg_discount": 0.054615384615384614d, "t_avg_tax": 0.04076923076923077d, "t_max_shipdate": "1998-02-27", "t_min_commitdate": "1992-09-11", "t_min_receiptdate": "1992-08-08", "t_max_comment": "ymptotes haggle across the ca" }
+, { "t_partkey": 22, "t_count": 28i64, "t_avg_quantity": 5.300000000000001d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 24433.53d, "t_avg_discount": 0.057857142857142864d, "t_avg_tax": 0.045d, "t_max_shipdate": "1998-09-03", "t_min_commitdate": "1992-05-23", "t_min_receiptdate": "1992-07-12", "t_max_comment": "y final gifts are. carefully pe" }
+, { "t_partkey": 23, "t_count": 23i64, "t_avg_quantity": 5.22608695652174d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 24118.913913043478d, "t_avg_discount": 0.051304347826086956d, "t_avg_tax": 0.03173913043478261d, "t_max_shipdate": "1998-09-25", "t_min_commitdate": "1992-04-05", "t_min_receiptdate": "1992-05-02", "t_max_comment": "y unusual foxe" }
+, { "t_partkey": 24, "t_count": 35i64, "t_avg_quantity": 5.154285714285715d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23813.31542857143d, "t_avg_discount": 0.046d, "t_avg_tax": 0.04d, "t_max_shipdate": "1998-06-23", "t_min_commitdate": "1992-05-07", "t_min_receiptdate": "1992-04-21", "t_max_comment": "the slyly ironic pinto beans. fi" }
+, { "t_partkey": 25, "t_count": 26i64, "t_avg_quantity": 5.061538461538461d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 23410.121538461535d, "t_avg_discount": 0.054615384615384614d, "t_avg_tax": 0.034999999999999996d, "t_max_shipdate": "1998-06-26", "t_min_commitdate": "1992-03-18", "t_min_receiptdate": "1992-02-24", "t_max_comment": "y alongside of the special requests." }
+, { "t_partkey": 26, "t_count": 23i64, "t_avg_quantity": 4.6521739130434785d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 21540.030434782606d, "t_avg_discount": 0.03956521739130436d, "t_avg_tax": 0.043043478260869565d, "t_max_shipdate": "1998-10-09", "t_min_commitdate": "1992-03-16", "t_min_receiptdate": "1992-03-20", "t_max_comment": "y special pinto beans cajole " }
+, { "t_partkey": 27, "t_count": 18i64, "t_avg_quantity": 5.9222222222222225d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 27450.092222222225d, "t_avg_discount": 0.061111111111111116d, "t_avg_tax": 0.045000000000000005d, "t_max_shipdate": "1998-09-19", "t_min_commitdate": "1992-06-12", "t_min_receiptdate": "1992-07-31", "t_max_comment": "y regular foxes. slyly ironic deposits " }
+, { "t_partkey": 28, "t_count": 21i64, "t_avg_quantity": 5.476190476190476d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 25410.071428571428d, "t_avg_discount": 0.04285714285714286d, "t_avg_tax": 0.032857142857142856d, "t_max_shipdate": "1998-01-02", "t_min_commitdate": "1992-05-31", "t_min_receiptdate": "1992-04-05", "t_max_comment": "ular accounts about" }
+, { "t_partkey": 29, "t_count": 35i64, "t_avg_quantity": 5.171428571428572d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 24021.802857142855d, "t_avg_discount": 0.05657142857142857d, "t_avg_tax": 0.03942857142857143d, "t_max_shipdate": "1998-11-17", "t_min_commitdate": "1992-05-19", "t_min_receiptdate": "1992-06-06", "t_max_comment": "xcuses? quickly stealthy dependenci" }
+, { "t_partkey": 30, "t_count": 22i64, "t_avg_quantity": 4.754545454545455d, "t_max_suppkey": 9, "t_max_linenumber": 5, "t_avg_extendedprice": 22109.349545454545d, "t_avg_discount": 0.04727272727272727d, "t_avg_tax": 0.03318181818181818d, "t_max_shipdate": "1998-07-18", "t_min_commitdate": "1992-04-06", "t_min_receiptdate": "1992-05-01", "t_max_comment": "y. fluffily pending d" }
+, { "t_partkey": 31, "t_count": 31i64, "t_avg_quantity": 5.858064516129033d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 27270.16903225807d, "t_avg_discount": 0.050645161290322586d, "t_avg_tax": 0.035483870967741936d, "t_max_shipdate": "1998-08-08", "t_min_commitdate": "1992-05-23", "t_min_receiptdate": "1992-07-25", "t_max_comment": "xpress ideas detect b" }
+, { "t_partkey": 32, "t_count": 28i64, "t_avg_quantity": 5.050000000000001d, "t_max_suppkey": 8, "t_max_linenumber": 5, "t_avg_extendedprice": 23533.7575d, "t_avg_discount": 0.05249999999999999d, "t_avg_tax": 0.03321428571428571d, "t_max_shipdate": "1998-03-22", "t_min_commitdate": "1992-07-21", "t_min_receiptdate": "1992-09-27", "t_max_comment": "yers. accounts affix somet" }
+, { "t_partkey": 33, "t_count": 25i64, "t_avg_quantity": 5.04d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 23512.356d, "t_avg_discount": 0.044000000000000004d, "t_avg_tax": 0.03440000000000001d, "t_max_shipdate": "1998-08-01", "t_min_commitdate": "1992-04-26", "t_min_receiptdate": "1992-04-16", "t_max_comment": "yly enticing requ" }
+, { "t_partkey": 34, "t_count": 33i64, "t_avg_quantity": 4.575757575757576d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 21369.474242424243d, "t_avg_discount": 0.04666666666666667d, "t_avg_tax": 0.04363636363636364d, "t_max_shipdate": "1998-10-22", "t_min_commitdate": "1992-05-10", "t_min_receiptdate": "1992-07-24", "t_max_comment": "warthogs wake carefully acro" }
+, { "t_partkey": 35, "t_count": 26i64, "t_avg_quantity": 4.753846153846154d, "t_max_suppkey": 6, "t_max_linenumber": 6, "t_avg_extendedprice": 22224.94384615385d, "t_avg_discount": 0.05615384615384615d, "t_avg_tax": 0.04307692307692308d, "t_max_shipdate": "1998-08-13", "t_min_commitdate": "1992-04-12", "t_min_receiptdate": "1992-03-30", "t_max_comment": "y pending packages sleep blithely regular r" }
+, { "t_partkey": 36, "t_count": 25i64, "t_avg_quantity": 4.192d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 19619.188800000004d, "t_avg_discount": 0.054000000000000006d, "t_avg_tax": 0.034d, "t_max_shipdate": "1998-05-07", "t_min_commitdate": "1992-03-24", "t_min_receiptdate": "1992-03-20", "t_max_comment": "y slyly express deposits. final i" }
+, { "t_partkey": 37, "t_count": 17i64, "t_avg_quantity": 4.564705882352942d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 21386.331764705883d, "t_avg_discount": 0.06058823529411765d, "t_avg_tax": 0.05d, "t_max_shipdate": "1998-08-30", "t_min_commitdate": "1992-07-25", "t_min_receiptdate": "1992-09-10", "t_max_comment": "unts promise across the requests. blith" }
+, { "t_partkey": 38, "t_count": 26i64, "t_avg_quantity": 6.0076923076923086d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 28176.978076923075d, "t_avg_discount": 0.05653846153846154d, "t_avg_tax": 0.030384615384615385d, "t_max_shipdate": "1998-06-07", "t_min_commitdate": "1992-02-24", "t_min_receiptdate": "1992-04-26", "t_max_comment": "yly. blithely bold theodolites wa" }
+, { "t_partkey": 39, "t_count": 22i64, "t_avg_quantity": 4.454545454545455d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 20914.75909090909d, "t_avg_discount": 0.05318181818181819d, "t_avg_tax": 0.034999999999999996d, "t_max_shipdate": "1998-08-31", "t_min_commitdate": "1992-05-25", "t_min_receiptdate": "1992-06-03", "t_max_comment": "y. furiously ironic ideas gr" }
+, { "t_partkey": 40, "t_count": 34i64, "t_avg_quantity": 4.61764705882353d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 21703.864705882355d, "t_avg_discount": 0.0511764705882353d, "t_avg_tax": 0.03735294117647059d, "t_max_shipdate": "1998-06-12", "t_min_commitdate": "1992-03-04", "t_min_receiptdate": "1992-02-10", "t_max_comment": "y special a" }
+, { "t_partkey": 41, "t_count": 25i64, "t_avg_quantity": 5.936d, "t_max_suppkey": 10, "t_max_linenumber": 5, "t_avg_extendedprice": 27930.0672d, "t_avg_discount": 0.0484d, "t_avg_tax": 0.0444d, "t_max_shipdate": "1998-09-18", "t_min_commitdate": "1992-11-13", "t_min_receiptdate": "1993-01-09", "t_max_comment": "uffily even accounts. packages sleep blithe" }
+, { "t_partkey": 42, "t_count": 31i64, "t_avg_quantity": 3.7806451612903227d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 17807.594838709676d, "t_avg_discount": 0.05193548387096774d, "t_avg_tax": 0.0364516129032258d, "t_max_shipdate": "1998-08-12", "t_min_commitdate": "1992-10-29", "t_min_receiptdate": "1992-11-02", "t_max_comment": "y final platelets sublate among the " }
+, { "t_partkey": 43, "t_count": 32i64, "t_avg_quantity": 6.03125d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 28438.550000000003d, "t_avg_discount": 0.045000000000000005d, "t_avg_tax": 0.047812499999999994d, "t_max_shipdate": "1998-11-01", "t_min_commitdate": "1992-07-09", "t_min_receiptdate": "1992-07-07", "t_max_comment": "y regular packages. b" }
+, { "t_partkey": 44, "t_count": 23i64, "t_avg_quantity": 5.852173913043479d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 27623.43130434783d, "t_avg_discount": 0.05565217391304349d, "t_avg_tax": 0.04391304347826087d, "t_max_shipdate": "1998-08-12", "t_min_commitdate": "1992-02-16", "t_min_receiptdate": "1992-03-01", "t_max_comment": "unts. furiously silent" }
+, { "t_partkey": 45, "t_count": 34i64, "t_avg_quantity": 5.305882352941177d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 25071.35529411765d, "t_avg_discount": 0.05147058823529413d, "t_avg_tax": 0.039411764705882354d, "t_max_shipdate": "1998-09-09", "t_min_commitdate": "1992-05-07", "t_min_receiptdate": "1992-07-23", "t_max_comment": "y. bold pinto beans use " }
+, { "t_partkey": 46, "t_count": 34i64, "t_avg_quantity": 4.405882352941177d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 20840.704705882352d, "t_avg_discount": 0.05823529411764706d, "t_avg_tax": 0.0411764705882353d, "t_max_shipdate": "1998-10-25", "t_min_commitdate": "1992-04-21", "t_min_receiptdate": "1992-05-18", "t_max_comment": "xpress pinto beans. accounts a" }
+, { "t_partkey": 47, "t_count": 31i64, "t_avg_quantity": 5.129032258064516d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 24286.993548387094d, "t_avg_discount": 0.05064516129032258d, "t_avg_tax": 0.03967741935483871d, "t_max_shipdate": "1998-07-31", "t_min_commitdate": "1992-04-09", "t_min_receiptdate": "1992-04-05", "t_max_comment": "y ironic requests above the fluffily d" }
+, { "t_partkey": 48, "t_count": 37i64, "t_avg_quantity": 4.8756756756756765d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23111.67783783784d, "t_avg_discount": 0.04054054054054054d, "t_avg_tax": 0.03918918918918919d, "t_max_shipdate": "1998-08-17", "t_min_commitdate": "1992-05-30", "t_min_receiptdate": "1992-05-11", "t_max_comment": "y according to " }
+, { "t_partkey": 49, "t_count": 28i64, "t_avg_quantity": 5.4071428571428575d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 25657.97428571429d, "t_avg_discount": 0.0475d, "t_avg_tax": 0.04107142857142857d, "t_max_shipdate": "1998-09-03", "t_min_commitdate": "1992-02-27", "t_min_receiptdate": "1992-05-26", "t_max_comment": "unts alongs" }
+, { "t_partkey": 50, "t_count": 39i64, "t_avg_quantity": 4.4974358974358974d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 21363.944871794873d, "t_avg_discount": 0.04820512820512821d, "t_avg_tax": 0.04025641025641026d, "t_max_shipdate": "1998-09-12", "t_min_commitdate": "1992-05-13", "t_min_receiptdate": "1992-04-29", "t_max_comment": "yly pending theodolites." }
+, { "t_partkey": 51, "t_count": 35i64, "t_avg_quantity": 4.908571428571429d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23341.484285714283d, "t_avg_discount": 0.04914285714285715d, "t_avg_tax": 0.039428571428571424d, "t_max_shipdate": "1998-08-01", "t_min_commitdate": "1992-03-30", "t_min_receiptdate": "1992-03-31", "t_max_comment": "y ironic pin" }
+, { "t_partkey": 52, "t_count": 32i64, "t_avg_quantity": 5.91875d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 28174.7296875d, "t_avg_discount": 0.051250000000000004d, "t_avg_tax": 0.049375d, "t_max_shipdate": "1998-09-09", "t_min_commitdate": "1992-05-09", "t_min_receiptdate": "1992-06-02", "t_max_comment": "y pending orbits boost after the slyly" }
+, { "t_partkey": 53, "t_count": 24i64, "t_avg_quantity": 5.175000000000001d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 24660.16875d, "t_avg_discount": 0.04875000000000001d, "t_avg_tax": 0.04583333333333333d, "t_max_shipdate": "1998-11-10", "t_min_commitdate": "1992-02-23", "t_min_receiptdate": "1992-01-25", "t_max_comment": "y orbits. final depos" }
+, { "t_partkey": 54, "t_count": 34i64, "t_avg_quantity": 5.01764705882353d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 23935.430882352943d, "t_avg_discount": 0.05205882352941177d, "t_avg_tax": 0.04147058823529412d, "t_max_shipdate": "1998-05-26", "t_min_commitdate": "1992-03-28", "t_min_receiptdate": "1992-04-09", "t_max_comment": "y pending notornis ab" }
+, { "t_partkey": 55, "t_count": 30i64, "t_avg_quantity": 6.553333333333334d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 31293.805d, "t_avg_discount": 0.050666666666666665d, "t_avg_tax": 0.03933333333333334d, "t_max_shipdate": "1998-06-06", "t_min_commitdate": "1992-03-12", "t_min_receiptdate": "1992-02-06", "t_max_comment": "yly regular i" }
+, { "t_partkey": 56, "t_count": 24i64, "t_avg_quantity": 4.825d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 23064.70625d, "t_avg_discount": 0.05583333333333334d, "t_avg_tax": 0.037916666666666675d, "t_max_shipdate": "1998-07-22", "t_min_commitdate": "1992-03-01", "t_min_receiptdate": "1992-02-06", "t_max_comment": "ts. ironic, fina" }
+, { "t_partkey": 57, "t_count": 37i64, "t_avg_quantity": 5.5297297297297305d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 26461.139189189194d, "t_avg_discount": 0.05297297297297297d, "t_avg_tax": 0.03945945945945946d, "t_max_shipdate": "1998-08-16", "t_min_commitdate": "1992-03-20", "t_min_receiptdate": "1992-01-17", "t_max_comment": "y. doggedly pend" }
+, { "t_partkey": 58, "t_count": 28i64, "t_avg_quantity": 4.764285714285715d, "t_max_suppkey": 10, "t_max_linenumber": 5, "t_avg_extendedprice": 22822.119642857146d, "t_avg_discount": 0.05571428571428571d, "t_avg_tax": 0.04535714285714286d, "t_max_shipdate": "1998-11-27", "t_min_commitdate": "1992-02-23", "t_min_receiptdate": "1992-05-17", "t_max_comment": "xpress, bo" }
+, { "t_partkey": 59, "t_count": 37i64, "t_avg_quantity": 5.567567567567568d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 26697.87837837838d, "t_avg_discount": 0.042702702702702704d, "t_avg_tax": 0.049459459459459454d, "t_max_shipdate": "1998-07-12", "t_min_commitdate": "1992-02-26", "t_min_receiptdate": "1992-02-11", "t_max_comment": "y. ironic deposits haggle sl" }
+, { "t_partkey": 60, "t_count": 28i64, "t_avg_quantity": 5.0d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 24001.5d, "t_avg_discount": 0.05428571428571429d, "t_avg_tax": 0.042499999999999996d, "t_max_shipdate": "1998-07-08", "t_min_commitdate": "1992-03-02", "t_min_receiptdate": "1992-03-02", "t_max_comment": "y across the express accounts. fluff" }
+, { "t_partkey": 61, "t_count": 29i64, "t_avg_quantity": 5.593103448275862d, "t_max_suppkey": 10, "t_max_linenumber": 5, "t_avg_extendedprice": 26876.539999999997d, "t_avg_discount": 0.04931034482758621d, "t_avg_tax": 0.04103448275862069d, "t_max_shipdate": "1998-08-06", "t_min_commitdate": "1993-06-25", "t_min_receiptdate": "1993-08-03", "t_max_comment": "y even asymptotes. courts are unusual pa" }
+, { "t_partkey": 62, "t_count": 24i64, "t_avg_quantity": 5.175000000000001d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 24893.3025d, "t_avg_discount": 0.048749999999999995d, "t_avg_tax": 0.04d, "t_max_shipdate": "1998-05-27", "t_min_commitdate": "1992-02-17", "t_min_receiptdate": "1992-02-08", "t_max_comment": "yly final accounts hag" }
+, { "t_partkey": 63, "t_count": 26i64, "t_avg_quantity": 4.992307692307692d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 24039.45923076923d, "t_avg_discount": 0.052307692307692305d, "t_avg_tax": 0.04884615384615386d, "t_max_shipdate": "1998-05-08", "t_min_commitdate": "1992-03-07", "t_min_receiptdate": "1992-02-19", "t_max_comment": "y special packages wak" }
+, { "t_partkey": 64, "t_count": 31i64, "t_avg_quantity": 4.838709677419356d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23324.032258064515d, "t_avg_discount": 0.050645161290322586d, "t_avg_tax": 0.03709677419354839d, "t_max_shipdate": "1998-10-10", "t_min_commitdate": "1992-02-05", "t_min_receiptdate": "1992-02-29", "t_max_comment": "uietly regular foxes wake quick" }
+, { "t_partkey": 65, "t_count": 36i64, "t_avg_quantity": 5.033333333333334d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 24287.343333333338d, "t_avg_discount": 0.049166666666666664d, "t_avg_tax": 0.04083333333333334d, "t_max_shipdate": "1998-06-17", "t_min_commitdate": "1992-04-14", "t_min_receiptdate": "1992-03-13", "t_max_comment": "y unusual packages. packages" }
+, { "t_partkey": 66, "t_count": 29i64, "t_avg_quantity": 4.23448275862069d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 20453.82206896552d, "t_avg_discount": 0.05068965517241379d, "t_avg_tax": 0.051034482758620686d, "t_max_shipdate": "1998-05-23", "t_min_commitdate": "1992-06-18", "t_min_receiptdate": "1992-05-10", "t_max_comment": "y. pinto beans haggle after the" }
+, { "t_partkey": 67, "t_count": 21i64, "t_avg_quantity": 4.523809523809525d, "t_max_suppkey": 8, "t_max_linenumber": 5, "t_avg_extendedprice": 21873.976190476194d, "t_avg_discount": 0.05428571428571429d, "t_avg_tax": 0.04476190476190477d, "t_max_shipdate": "1998-08-27", "t_min_commitdate": "1992-06-07", "t_min_receiptdate": "1992-05-26", "t_max_comment": "theodolite" }
+, { "t_partkey": 68, "t_count": 36i64, "t_avg_quantity": 4.388888888888888d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 21243.53888888889d, "t_avg_discount": 0.059444444444444446d, "t_avg_tax": 0.04305555555555555d, "t_max_shipdate": "1998-09-10", "t_min_commitdate": "1992-06-03", "t_min_receiptdate": "1992-05-11", "t_max_comment": "y final ac" }
+, { "t_partkey": 69, "t_count": 24i64, "t_avg_quantity": 4.708333333333334d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 22813.287499999995d, "t_avg_discount": 0.059166666666666666d, "t_avg_tax": 0.03958333333333333d, "t_max_shipdate": "1998-09-02", "t_min_commitdate": "1992-06-04", "t_min_receiptdate": "1992-06-03", "t_max_comment": "yly furiously even id" }
+, { "t_partkey": 70, "t_count": 34i64, "t_avg_quantity": 5.029411764705883d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 24394.407352941176d, "t_avg_discount": 0.04558823529411765d, "t_avg_tax": 0.04352941176470588d, "t_max_shipdate": "1998-07-19", "t_min_commitdate": "1992-04-10", "t_min_receiptdate": "1992-04-29", "t_max_comment": "ts affix slyly accordi" }
+, { "t_partkey": 71, "t_count": 33i64, "t_avg_quantity": 5.024242424242424d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 24394.455454545456d, "t_avg_discount": 0.04515151515151515d, "t_avg_tax": 0.03818181818181819d, "t_max_shipdate": "1998-10-03", "t_min_commitdate": "1992-10-19", "t_min_receiptdate": "1992-12-05", "t_max_comment": "y regular foxes wake among the final" }
+, { "t_partkey": 72, "t_count": 36i64, "t_avg_quantity": 4.833333333333334d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 23491.691666666666d, "t_avg_discount": 0.053888888888888896d, "t_avg_tax": 0.038055555555555565d, "t_max_shipdate": "1998-07-21", "t_min_commitdate": "1992-09-04", "t_min_receiptdate": "1992-10-14", "t_max_comment": "yly along the ironic, fi" }
+, { "t_partkey": 73, "t_count": 27i64, "t_avg_quantity": 4.5851851851851855d, "t_max_suppkey": 4, "t_max_linenumber": 7, "t_avg_extendedprice": 22308.530740740738d, "t_avg_discount": 0.04481481481481482d, "t_avg_tax": 0.03333333333333333d, "t_max_shipdate": "1998-10-12", "t_min_commitdate": "1992-03-01", "t_min_receiptdate": "1992-01-09", "t_max_comment": "y even packages promise" }
+, { "t_partkey": 74, "t_count": 25i64, "t_avg_quantity": 6.016d, "t_max_suppkey": 5, "t_max_linenumber": 7, "t_avg_extendedprice": 29300.025600000004d, "t_avg_discount": 0.0528d, "t_avg_tax": 0.0388d, "t_max_shipdate": "1998-03-23", "t_min_commitdate": "1992-03-22", "t_min_receiptdate": "1992-03-25", "t_max_comment": "uests. blithely unus" }
+, { "t_partkey": 75, "t_count": 29i64, "t_avg_quantity": 5.131034482758621d, "t_max_suppkey": 6, "t_max_linenumber": 6, "t_avg_extendedprice": 25015.58896551724d, "t_avg_discount": 0.06310344827586208d, "t_avg_tax": 0.02896551724137931d, "t_max_shipdate": "1998-10-19", "t_min_commitdate": "1992-02-18", "t_min_receiptdate": "1992-03-31", "t_max_comment": "usly across the slyly busy accounts! fin" }
+, { "t_partkey": 76, "t_count": 21i64, "t_avg_quantity": 4.9714285714285715d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 24262.31142857143d, "t_avg_discount": 0.04d, "t_avg_tax": 0.041428571428571426d, "t_max_shipdate": "1998-05-31", "t_min_commitdate": "1992-08-25", "t_min_receiptdate": "1992-11-16", "t_max_comment": "y even accounts thrash care" }
+, { "t_partkey": 77, "t_count": 20i64, "t_avg_quantity": 6.08d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 29702.927999999996d, "t_avg_discount": 0.053500000000000006d, "t_avg_tax": 0.037d, "t_max_shipdate": "1998-06-16", "t_min_commitdate": "1992-09-20", "t_min_receiptdate": "1992-08-19", "t_max_comment": "usly at the blithely pending pl" }
+, { "t_partkey": 78, "t_count": 35i64, "t_avg_quantity": 4.485714285714286d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 21936.71285714286d, "t_avg_discount": 0.05942857142857143d, "t_avg_tax": 0.042285714285714295d, "t_max_shipdate": "1998-08-03", "t_min_commitdate": "1992-03-24", "t_min_receiptdate": "1992-03-21", "t_max_comment": "yly after the fluffily regul" }
+, { "t_partkey": 79, "t_count": 37i64, "t_avg_quantity": 5.65945945945946d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 27705.03486486486d, "t_avg_discount": 0.04810810810810811d, "t_avg_tax": 0.042432432432432436d, "t_max_shipdate": "1998-10-09", "t_min_commitdate": "1992-05-23", "t_min_receiptdate": "1992-08-24", "t_max_comment": "y slyly final" }
+, { "t_partkey": 80, "t_count": 29i64, "t_avg_quantity": 6.172413793103448d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 30247.296551724135d, "t_avg_discount": 0.04655172413793104d, "t_avg_tax": 0.03413793103448276d, "t_max_shipdate": "1998-10-08", "t_min_commitdate": "1992-07-01", "t_min_receiptdate": "1992-06-07", "t_max_comment": "yly ironic frets. pending foxes after " }
+, { "t_partkey": 81, "t_count": 21i64, "t_avg_quantity": 5.371428571428572d, "t_max_suppkey": 2, "t_max_linenumber": 7, "t_avg_extendedprice": 26349.005714285708d, "t_avg_discount": 0.044285714285714296d, "t_avg_tax": 0.04095238095238095d, "t_max_shipdate": "1998-06-02", "t_min_commitdate": "1992-04-18", "t_min_receiptdate": "1992-04-22", "t_max_comment": "yly even accounts. spe" }
+, { "t_partkey": 82, "t_count": 23i64, "t_avg_quantity": 4.3130434782608695d, "t_max_suppkey": 3, "t_max_linenumber": 7, "t_avg_extendedprice": 21178.768695652176d, "t_avg_discount": 0.05260869565217391d, "t_avg_tax": 0.043043478260869565d, "t_max_shipdate": "1998-04-09", "t_min_commitdate": "1992-08-17", "t_min_receiptdate": "1992-07-22", "t_max_comment": "ut the carefully special foxes. idle," }
+, { "t_partkey": 83, "t_count": 33i64, "t_avg_quantity": 5.115151515151515d, "t_max_suppkey": 4, "t_max_linenumber": 7, "t_avg_extendedprice": 25143.01575757576d, "t_avg_discount": 0.05303030303030303d, "t_avg_tax": 0.043030303030303044d, "t_max_shipdate": "1998-10-12", "t_min_commitdate": "1992-07-05", "t_min_receiptdate": "1992-06-25", "t_max_comment": "yly. slyly regular courts use silentl" }
+, { "t_partkey": 84, "t_count": 28i64, "t_avg_quantity": 5.585714285714285d, "t_max_suppkey": 5, "t_max_linenumber": 7, "t_avg_extendedprice": 27483.948571428573d, "t_avg_discount": 0.05464285714285715d, "t_avg_tax": 0.039999999999999994d, "t_max_shipdate": "1998-10-03", "t_min_commitdate": "1992-08-25", "t_min_receiptdate": "1992-09-16", "t_max_comment": "yly brave theod" }
+, { "t_partkey": 85, "t_count": 28i64, "t_avg_quantity": 4.121428571428572d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 20299.684285714284d, "t_avg_discount": 0.041785714285714294d, "t_avg_tax": 0.041785714285714294d, "t_max_shipdate": "1998-07-23", "t_min_commitdate": "1992-04-24", "t_min_receiptdate": "1992-03-10", "t_max_comment": "y. enticingly final depos" }
+, { "t_partkey": 86, "t_count": 36i64, "t_avg_quantity": 5.427777777777778d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 26761.115555555552d, "t_avg_discount": 0.049999999999999996d, "t_avg_tax": 0.04555555555555556d, "t_max_shipdate": "1998-07-10", "t_min_commitdate": "1992-04-14", "t_min_receiptdate": "1992-06-23", "t_max_comment": "unts. furiously express accounts w" }
+, { "t_partkey": 87, "t_count": 34i64, "t_avg_quantity": 4.658823529411765d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 22993.157647058822d, "t_avg_discount": 0.052352941176470595d, "t_avg_tax": 0.036470588235294116d, "t_max_shipdate": "1998-09-18", "t_min_commitdate": "1992-10-18", "t_min_receiptdate": "1992-10-15", "t_max_comment": "y final de" }
+, { "t_partkey": 88, "t_count": 29i64, "t_avg_quantity": 4.613793103448276d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 22793.983448275863d, "t_avg_discount": 0.04724137931034483d, "t_avg_tax": 0.039655172413793106d, "t_max_shipdate": "1998-10-27", "t_min_commitdate": "1992-06-03", "t_min_receiptdate": "1992-05-16", "t_max_comment": "y slyly ironic accounts. foxes haggle slyl" }
+, { "t_partkey": 89, "t_count": 28i64, "t_avg_quantity": 4.864285714285715d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 24055.838571428576d, "t_avg_discount": 0.04642857142857143d, "t_avg_tax": 0.05035714285714286d, "t_max_shipdate": "1998-10-23", "t_min_commitdate": "1992-03-18", "t_min_receiptdate": "1992-05-07", "t_max_comment": "y carefully final ideas. f" }
+, { "t_partkey": 90, "t_count": 48i64, "t_avg_quantity": 5.4d, "t_max_suppkey": 1, "t_max_linenumber": 7, "t_avg_extendedprice": 26732.430000000004d, "t_avg_discount": 0.044583333333333336d, "t_avg_tax": 0.04229166666666667d, "t_max_shipdate": "1998-10-09", "t_min_commitdate": "1992-04-25", "t_min_receiptdate": "1992-03-17", "t_max_comment": "y regular notornis k" }
+, { "t_partkey": 91, "t_count": 28i64, "t_avg_quantity": 4.1571428571428575d, "t_max_suppkey": 5, "t_max_linenumber": 7, "t_avg_extendedprice": 20600.513571428568d, "t_avg_discount": 0.055714285714285716d, "t_avg_tax": 0.04107142857142858d, "t_max_shipdate": "1998-09-07", "t_min_commitdate": "1992-06-08", "t_min_receiptdate": "1992-06-20", "t_max_comment": "ven deposits about the regular, ironi" }
+, { "t_partkey": 92, "t_count": 30i64, "t_avg_quantity": 5.466666666666667d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 27117.126666666667d, "t_avg_discount": 0.060666666666666674d, "t_avg_tax": 0.044000000000000004d, "t_max_shipdate": "1997-11-30", "t_min_commitdate": "1992-03-15", "t_min_receiptdate": "1992-02-14", "t_max_comment": "warhorses wake never for the care" }
+, { "t_partkey": 93, "t_count": 31i64, "t_avg_quantity": 5.219354838709678d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 25916.445483870968d, "t_avg_discount": 0.05903225806451613d, "t_avg_tax": 0.04096774193548387d, "t_max_shipdate": "1998-11-25", "t_min_commitdate": "1992-05-29", "t_min_receiptdate": "1992-06-02", "t_max_comment": "ut the slyly bold pinto beans; fi" }
+, { "t_partkey": 94, "t_count": 32i64, "t_avg_quantity": 5.7d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 28331.565d, "t_avg_discount": 0.05d, "t_avg_tax": 0.040625d, "t_max_shipdate": "1998-03-09", "t_min_commitdate": "1992-04-09", "t_min_receiptdate": "1992-05-23", "t_max_comment": "y furious depen" }
+, { "t_partkey": 95, "t_count": 31i64, "t_avg_quantity": 4.7290322580645165d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23529.063548387097d, "t_avg_discount": 0.050967741935483875d, "t_avg_tax": 0.038387096774193545d, "t_max_shipdate": "1998-10-07", "t_min_commitdate": "1992-02-14", "t_min_receiptdate": "1992-03-23", "t_max_comment": "y final excuses. ironic, special requests a" }
+, { "t_partkey": 96, "t_count": 38i64, "t_avg_quantity": 5.368421052631579d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 26737.15263157895d, "t_avg_discount": 0.04315789473684212d, "t_avg_tax": 0.04026315789473684d, "t_max_shipdate": "1998-11-03", "t_min_commitdate": "1992-05-16", "t_min_receiptdate": "1992-07-02", "t_max_comment": "y. slyly iron" }
+, { "t_partkey": 97, "t_count": 39i64, "t_avg_quantity": 4.774358974358974d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 23802.327948717946d, "t_avg_discount": 0.04717948717948718d, "t_avg_tax": 0.03794871794871795d, "t_max_shipdate": "1998-05-15", "t_min_commitdate": "1992-03-16", "t_min_receiptdate": "1992-02-19", "t_max_comment": "y slyly express theodolites. slyly bo" }
+, { "t_partkey": 98, "t_count": 29i64, "t_avg_quantity": 4.441379310344828d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 22164.481379310342d, "t_avg_discount": 0.0506896551724138d, "t_avg_tax": 0.03862068965517241d, "t_max_shipdate": "1998-10-04", "t_min_commitdate": "1992-08-20", "t_min_receiptdate": "1992-10-08", "t_max_comment": "ven requests should sleep along " }
+, { "t_partkey": 99, "t_count": 22i64, "t_avg_quantity": 4.609090909090909d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 23024.48318181818d, "t_avg_discount": 0.05318181818181818d, "t_avg_tax": 0.038181818181818185d, "t_max_shipdate": "1998-02-16", "t_min_commitdate": "1992-03-03", "t_min_receiptdate": "1992-05-24", "t_max_comment": "yly pending excu" }
+, { "t_partkey": 100, "t_count": 41i64, "t_avg_quantity": 5.51219512195122d, "t_max_suppkey": 4, "t_max_linenumber": 6, "t_avg_extendedprice": 27563.731707317078d, "t_avg_discount": 0.05048780487804879d, "t_avg_tax": 0.04048780487804878d, "t_max_shipdate": "1998-06-24", "t_min_commitdate": "1992-03-06", "t_min_receiptdate": "1992-04-13", "t_max_comment": "xpress accounts sleep slyly re" }
+, { "t_partkey": 101, "t_count": 28i64, "t_avg_quantity": 5.707142857142857d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 28567.103571428568d, "t_avg_discount": 0.054285714285714284d, "t_avg_tax": 0.04571428571428572d, "t_max_shipdate": "1998-02-25", "t_min_commitdate": "1992-07-26", "t_min_receiptdate": "1992-08-20", "t_max_comment": "uses are care" }
+, { "t_partkey": 102, "t_count": 38i64, "t_avg_quantity": 4.263157894736842d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 21360.552631578947d, "t_avg_discount": 0.05052631578947368d, "t_avg_tax": 0.04315789473684211d, "t_max_shipdate": "1998-09-01", "t_min_commitdate": "1992-09-09", "t_min_receiptdate": "1992-08-28", "t_max_comment": "y unusual packa" }
+, { "t_partkey": 103, "t_count": 25i64, "t_avg_quantity": 6.16d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 30895.48d, "t_avg_discount": 0.0408d, "t_avg_tax": 0.0432d, "t_max_shipdate": "1998-11-16", "t_min_commitdate": "1992-05-16", "t_min_receiptdate": "1992-04-20", "t_max_comment": "yly. unusu" }
+, { "t_partkey": 104, "t_count": 19i64, "t_avg_quantity": 5.178947368421053d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 26000.9052631579d, "t_avg_discount": 0.04263157894736842d, "t_avg_tax": 0.034210526315789476d, "t_max_shipdate": "1998-04-17", "t_min_commitdate": "1992-03-29", "t_min_receiptdate": "1992-04-13", "t_max_comment": "yly even gifts after the sl" }
+, { "t_partkey": 105, "t_count": 36i64, "t_avg_quantity": 5.194444444444445d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 26104.68055555556d, "t_avg_discount": 0.05055555555555556d, "t_avg_tax": 0.03888888888888889d, "t_max_shipdate": "1998-08-25", "t_min_commitdate": "1992-03-19", "t_min_receiptdate": "1992-02-25", "t_max_comment": "yly into the carefully even " }
+, { "t_partkey": 106, "t_count": 27i64, "t_avg_quantity": 4.451851851851852d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 22395.040740740744d, "t_avg_discount": 0.039259259259259265d, "t_avg_tax": 0.039259259259259265d, "t_max_shipdate": "1998-07-25", "t_min_commitdate": "1992-05-18", "t_min_receiptdate": "1992-07-21", "t_max_comment": "y ironic foxes caj" }
+, { "t_partkey": 107, "t_count": 27i64, "t_avg_quantity": 4.733333333333333d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 23834.7d, "t_avg_discount": 0.04518518518518518d, "t_avg_tax": 0.037037037037037035d, "t_max_shipdate": "1998-09-29", "t_min_commitdate": "1992-06-25", "t_min_receiptdate": "1992-06-11", "t_max_comment": "y ruthless dolphins to " }
+, { "t_partkey": 108, "t_count": 28i64, "t_avg_quantity": 4.692857142857143d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 23654.346428571425d, "t_avg_discount": 0.05750000000000001d, "t_avg_tax": 0.046071428571428576d, "t_max_shipdate": "1998-09-07", "t_min_commitdate": "1992-06-14", "t_min_receiptdate": "1992-08-03", "t_max_comment": "y pending platelets x-ray ironically! pend" }
+, { "t_partkey": 109, "t_count": 35i64, "t_avg_quantity": 5.331428571428572d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 26899.722857142857d, "t_avg_discount": 0.048571428571428564d, "t_avg_tax": 0.044571428571428574d, "t_max_shipdate": "1997-08-27", "t_min_commitdate": "1992-06-18", "t_min_receiptdate": "1992-07-05", "t_max_comment": "ts wake furiously " }
+, { "t_partkey": 110, "t_count": 29i64, "t_avg_quantity": 4.86896551724138d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 24590.95379310345d, "t_avg_discount": 0.05344827586206897d, "t_avg_tax": 0.03517241379310345d, "t_max_shipdate": "1998-05-03", "t_min_commitdate": "1992-10-29", "t_min_receiptdate": "1992-09-27", "t_max_comment": "xcuses sleep quickly along th" }
+, { "t_partkey": 111, "t_count": 26i64, "t_avg_quantity": 6.130769230769231d, "t_max_suppkey": 8, "t_max_linenumber": 5, "t_avg_extendedprice": 30994.410384615392d, "t_avg_discount": 0.05038461538461539d, "t_avg_tax": 0.03576923076923077d, "t_max_shipdate": "1998-06-18", "t_min_commitdate": "1992-05-11", "t_min_receiptdate": "1992-07-29", "t_max_comment": "usy pinto beans b" }
+, { "t_partkey": 112, "t_count": 28i64, "t_avg_quantity": 5.457142857142857d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 27616.144285714287d, "t_avg_discount": 0.038571428571428576d, "t_avg_tax": 0.041785714285714294d, "t_max_shipdate": "1998-10-18", "t_min_commitdate": "1992-10-23", "t_min_receiptdate": "1992-09-29", "t_max_comment": "zle carefully sauternes. quickly" }
+, { "t_partkey": 113, "t_count": 28i64, "t_avg_quantity": 5.078571428571429d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 25725.7575d, "t_avg_discount": 0.04785714285714287d, "t_avg_tax": 0.048571428571428564d, "t_max_shipdate": "1998-06-28", "t_min_commitdate": "1992-08-10", "t_min_receiptdate": "1992-06-14", "t_max_comment": "yly silent deposit" }
+, { "t_partkey": 114, "t_count": 24i64, "t_avg_quantity": 5.041666666666667d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 25564.02291666667d, "t_avg_discount": 0.057916666666666665d, "t_avg_tax": 0.03958333333333334d, "t_max_shipdate": "1998-09-27", "t_min_commitdate": "1992-10-25", "t_min_receiptdate": "1992-12-04", "t_max_comment": "y unusual, ironic" }
+, { "t_partkey": 115, "t_count": 34i64, "t_avg_quantity": 4.594117647058823d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23317.673823529414d, "t_avg_discount": 0.045588235294117645d, "t_avg_tax": 0.03588235294117647d, "t_max_shipdate": "1998-04-27", "t_min_commitdate": "1992-04-19", "t_min_receiptdate": "1992-03-30", "t_max_comment": "y. final pearls kindle. accounts " }
+, { "t_partkey": 116, "t_count": 25i64, "t_avg_quantity": 5.5200000000000005d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 28044.635999999995d, "t_avg_discount": 0.0512d, "t_avg_tax": 0.046d, "t_max_shipdate": "1998-06-24", "t_min_commitdate": "1992-03-10", "t_min_receiptdate": "1992-04-14", "t_max_comment": "yly even epitaphs for the " }
+, { "t_partkey": 117, "t_count": 35i64, "t_avg_quantity": 5.337142857142858d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 27142.306857142856d, "t_avg_discount": 0.05742857142857143d, "t_avg_tax": 0.044285714285714296d, "t_max_shipdate": "1998-10-30", "t_min_commitdate": "1992-05-06", "t_min_receiptdate": "1992-05-11", "t_max_comment": "y ironic accounts. furiously even packa" }
+, { "t_partkey": 118, "t_count": 38i64, "t_avg_quantity": 4.321052631578947d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 21996.53447368421d, "t_avg_discount": 0.05342105263157895d, "t_avg_tax": 0.035526315789473684d, "t_max_shipdate": "1998-08-31", "t_min_commitdate": "1992-05-19", "t_min_receiptdate": "1992-07-02", "t_max_comment": "y. furiously even pinto be" }
+, { "t_partkey": 119, "t_count": 30i64, "t_avg_quantity": 5.4d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 27515.970000000005d, "t_avg_discount": 0.058333333333333334d, "t_avg_tax": 0.043000000000000003d, "t_max_shipdate": "1998-08-15", "t_min_commitdate": "1992-05-19", "t_min_receiptdate": "1992-06-05", "t_max_comment": "y regular theodolites w" }
+, { "t_partkey": 120, "t_count": 36i64, "t_avg_quantity": 5.75d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 29328.449999999997d, "t_avg_discount": 0.05222222222222223d, "t_avg_tax": 0.045000000000000005d, "t_max_shipdate": "1998-08-25", "t_min_commitdate": "1992-04-04", "t_min_receiptdate": "1992-04-02", "t_max_comment": "yly regular p" }
+, { "t_partkey": 121, "t_count": 34i64, "t_avg_quantity": 4.576470588235295d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 23365.628235294116d, "t_avg_discount": 0.052352941176470595d, "t_avg_tax": 0.03470588235294118d, "t_max_shipdate": "1998-08-22", "t_min_commitdate": "1992-05-22", "t_min_receiptdate": "1992-05-03", "t_max_comment": "y quickly regular packages. car" }
+, { "t_partkey": 122, "t_count": 44i64, "t_avg_quantity": 4.677272727272728d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 23903.67d, "t_avg_discount": 0.05113636363636364d, "t_avg_tax": 0.03977272727272727d, "t_max_shipdate": "1998-10-29", "t_min_commitdate": "1992-03-23", "t_min_receiptdate": "1992-04-07", "t_max_comment": "y bold package" }
+, { "t_partkey": 123, "t_count": 30i64, "t_avg_quantity": 5.213333333333334d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 26669.327999999994d, "t_avg_discount": 0.04466666666666666d, "t_avg_tax": 0.04066666666666666d, "t_max_shipdate": "1998-09-23", "t_min_commitdate": "1992-03-18", "t_min_receiptdate": "1992-02-29", "t_max_comment": "y quickly regular theodolites. final t" }
+, { "t_partkey": 124, "t_count": 32i64, "t_avg_quantity": 4.9375d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 25282.962499999998d, "t_avg_discount": 0.0553125d, "t_avg_tax": 0.043125d, "t_max_shipdate": "1998-11-15", "t_min_commitdate": "1992-07-21", "t_min_receiptdate": "1992-06-18", "t_max_comment": "y express ideas impress" }
+, { "t_partkey": 125, "t_count": 20i64, "t_avg_quantity": 6.07d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 31112.392000000003d, "t_avg_discount": 0.035500000000000004d, "t_avg_tax": 0.034d, "t_max_shipdate": "1998-05-05", "t_min_commitdate": "1992-04-24", "t_min_receiptdate": "1992-04-12", "t_max_comment": "y final deposits wake furiously! slyl" }
+, { "t_partkey": 126, "t_count": 31i64, "t_avg_quantity": 4.812903225806452d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 24693.08129032258d, "t_avg_discount": 0.04387096774193548d, "t_avg_tax": 0.03483870967741936d, "t_max_shipdate": "1998-01-30", "t_min_commitdate": "1992-07-09", "t_min_receiptdate": "1992-08-21", "t_max_comment": "x furiously bold packages. expres" }
+, { "t_partkey": 127, "t_count": 25i64, "t_avg_quantity": 4.744d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 24363.2864d, "t_avg_discount": 0.055600000000000004d, "t_avg_tax": 0.034d, "t_max_shipdate": "1998-05-25", "t_min_commitdate": "1992-06-30", "t_min_receiptdate": "1992-06-10", "t_max_comment": "ts integrate. courts haggl" }
+, { "t_partkey": 128, "t_count": 27i64, "t_avg_quantity": 5.155555555555556d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 26502.648888888885d, "t_avg_discount": 0.047407407407407405d, "t_avg_tax": 0.042222222222222223d, "t_max_shipdate": "1998-07-09", "t_min_commitdate": "1992-03-24", "t_min_receiptdate": "1992-03-15", "t_max_comment": "usly bold requests sleep dogge" }
+, { "t_partkey": 129, "t_count": 35i64, "t_avg_quantity": 5.262857142857143d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 27080.557714285715d, "t_avg_discount": 0.05600000000000001d, "t_avg_tax": 0.03514285714285714d, "t_max_shipdate": "1998-08-25", "t_min_commitdate": "1992-04-17", "t_min_receiptdate": "1992-04-02", "t_max_comment": "ven theodolites nag quickly. fluffi" }
+, { "t_partkey": 130, "t_count": 28i64, "t_avg_quantity": 6.0d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 30903.9d, "t_avg_discount": 0.04464285714285714d, "t_avg_tax": 0.04357142857142858d, "t_max_shipdate": "1998-07-19", "t_min_commitdate": "1992-05-30", "t_min_receiptdate": "1992-04-05", "t_max_comment": "ven theodolites around the slyly" }
+, { "t_partkey": 131, "t_count": 33i64, "t_avg_quantity": 4.715151515151515d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 24309.67090909091d, "t_avg_discount": 0.04454545454545455d, "t_avg_tax": 0.03878787878787879d, "t_max_shipdate": "1998-08-20", "t_min_commitdate": "1992-02-24", "t_min_receiptdate": "1992-03-09", "t_max_comment": "usual pinto beans." }
+, { "t_partkey": 132, "t_count": 30i64, "t_avg_quantity": 4.0200000000000005d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 20745.813000000002d, "t_avg_discount": 0.04733333333333334d, "t_avg_tax": 0.03766666666666667d, "t_max_shipdate": "1998-07-21", "t_min_commitdate": "1992-02-12", "t_min_receiptdate": "1992-04-30", "t_max_comment": "yly ironic foxes. regular requests h" }
+, { "t_partkey": 133, "t_count": 28i64, "t_avg_quantity": 5.6000000000000005d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 28927.639999999996d, "t_avg_discount": 0.048571428571428564d, "t_avg_tax": 0.029285714285714283d, "t_max_shipdate": "1998-05-12", "t_min_commitdate": "1992-07-07", "t_min_receiptdate": "1992-07-08", "t_max_comment": "xcuses would boost against the fluffily eve" }
+, { "t_partkey": 134, "t_count": 32i64, "t_avg_quantity": 5.6312500000000005d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 29117.222812499997d, "t_avg_discount": 0.051875000000000004d, "t_avg_tax": 0.0346875d, "t_max_shipdate": "1998-07-22", "t_min_commitdate": "1992-03-16", "t_min_receiptdate": "1992-06-06", "t_max_comment": "usly busy account" }
+, { "t_partkey": 135, "t_count": 29i64, "t_avg_quantity": 4.793103448275862d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 24807.42586206897d, "t_avg_discount": 0.054827586206896546d, "t_avg_tax": 0.03482758620689656d, "t_max_shipdate": "1998-08-03", "t_min_commitdate": "1992-04-10", "t_min_receiptdate": "1992-05-14", "t_max_comment": "y; excuses use. ironic, close instru" }
+, { "t_partkey": 136, "t_count": 35i64, "t_avg_quantity": 5.16d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 26732.154000000002d, "t_avg_discount": 0.04542857142857143d, "t_avg_tax": 0.036d, "t_max_shipdate": "1998-08-06", "t_min_commitdate": "1992-04-24", "t_min_receiptdate": "1992-05-24", "t_max_comment": "y final pinto " }
+, { "t_partkey": 137, "t_count": 38i64, "t_avg_quantity": 5.736842105263158d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 29749.2552631579d, "t_avg_discount": 0.04026315789473685d, "t_avg_tax": 0.04421052631578948d, "t_max_shipdate": "1997-08-19", "t_min_commitdate": "1992-06-29", "t_min_receiptdate": "1992-06-19", "t_max_comment": "uests cajole carefully." }
+, { "t_partkey": 138, "t_count": 42i64, "t_avg_quantity": 5.666666666666667d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 29413.68333333333d, "t_avg_discount": 0.05452380952380952d, "t_avg_tax": 0.03928571428571429d, "t_max_shipdate": "1998-08-29", "t_min_commitdate": "1992-04-12", "t_min_receiptdate": "1992-07-09", "t_max_comment": "yly idle deposits. final, final fox" }
+, { "t_partkey": 139, "t_count": 34i64, "t_avg_quantity": 5.364705882352942d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 27873.13411764706d, "t_avg_discount": 0.050588235294117656d, "t_avg_tax": 0.047058823529411764d, "t_max_shipdate": "1998-03-01", "t_min_commitdate": "1992-04-15", "t_min_receiptdate": "1992-04-28", "t_max_comment": "y express accounts above the exp" }
+, { "t_partkey": 140, "t_count": 35i64, "t_avg_quantity": 5.034285714285715d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 26181.809714285715d, "t_avg_discount": 0.054571428571428576d, "t_avg_tax": 0.04257142857142857d, "t_max_shipdate": "1998-06-24", "t_min_commitdate": "1992-04-14", "t_min_receiptdate": "1992-03-21", "t_max_comment": "y among the furiously special" }
+, { "t_partkey": 141, "t_count": 38i64, "t_avg_quantity": 5.5473684210526315d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 28877.935789473686d, "t_avg_discount": 0.037368421052631585d, "t_avg_tax": 0.052105263157894745d, "t_max_shipdate": "1998-10-26", "t_min_commitdate": "1992-02-26", "t_min_receiptdate": "1992-01-20", "t_max_comment": "yly silent ideas affix furiousl" }
+, { "t_partkey": 142, "t_count": 26i64, "t_avg_quantity": 6.138461538461539d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 31985.681538461537d, "t_avg_discount": 0.05d, "t_avg_tax": 0.047692307692307694d, "t_max_shipdate": "1998-06-06", "t_min_commitdate": "1992-12-21", "t_min_receiptdate": "1992-10-16", "t_max_comment": "usly bold instructions affix idly unusual, " }
+, { "t_partkey": 143, "t_count": 36i64, "t_avg_quantity": 4.95d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 25817.715000000004d, "t_avg_discount": 0.045000000000000005d, "t_avg_tax": 0.03972222222222222d, "t_max_shipdate": "1998-07-16", "t_min_commitdate": "1992-04-26", "t_min_receiptdate": "1992-05-17", "t_max_comment": "y pending foxes nag blithely " }
+, { "t_partkey": 144, "t_count": 32i64, "t_avg_quantity": 4.91875d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 25679.318125d, "t_avg_discount": 0.0465625d, "t_avg_tax": 0.0434375d, "t_max_shipdate": "1998-09-22", "t_min_commitdate": "1992-07-19", "t_min_receiptdate": "1992-07-30", "t_max_comment": "ve the fluffily " }
+, { "t_partkey": 145, "t_count": 24i64, "t_avg_quantity": 5.566666666666666d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 29089.73d, "t_avg_discount": 0.04541666666666667d, "t_avg_tax": 0.03666666666666666d, "t_max_shipdate": "1998-07-23", "t_min_commitdate": "1992-03-16", "t_min_receiptdate": "1992-01-27", "t_max_comment": "yly even platelets wake. " }
+, { "t_partkey": 146, "t_count": 27i64, "t_avg_quantity": 4.792592592592593d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 25068.614074074078d, "t_avg_discount": 0.05925925925925926d, "t_avg_tax": 0.04407407407407408d, "t_max_shipdate": "1998-07-09", "t_min_commitdate": "1992-05-18", "t_min_receiptdate": "1992-05-27", "t_max_comment": "ut the slyly specia" }
+, { "t_partkey": 147, "t_count": 31i64, "t_avg_quantity": 4.625806451612903d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 24219.334838709678d, "t_avg_discount": 0.05451612903225806d, "t_avg_tax": 0.04741935483870968d, "t_max_shipdate": "1998-06-18", "t_min_commitdate": "1992-07-06", "t_min_receiptdate": "1992-06-23", "t_max_comment": "yly special excuses. fluffily " }
+, { "t_partkey": 148, "t_count": 43i64, "t_avg_quantity": 5.158139534883722d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 27032.261860465118d, "t_avg_discount": 0.0516279069767442d, "t_avg_tax": 0.04093023255813954d, "t_max_shipdate": "1998-07-21", "t_min_commitdate": "1992-03-16", "t_min_receiptdate": "1992-01-27", "t_max_comment": "y special theodolites. carefully" }
+, { "t_partkey": 149, "t_count": 33i64, "t_avg_quantity": 4.363636363636363d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 22890.327272727274d, "t_avg_discount": 0.05d, "t_avg_tax": 0.03909090909090909d, "t_max_shipdate": "1998-06-06", "t_min_commitdate": "1992-03-06", "t_min_receiptdate": "1992-04-19", "t_max_comment": "y regular requests. furious" }
+, { "t_partkey": 150, "t_count": 29i64, "t_avg_quantity": 5.027586206896552d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 26398.598275862067d, "t_avg_discount": 0.05517241379310344d, "t_avg_tax": 0.04206896551724138d, "t_max_shipdate": "1998-08-06", "t_min_commitdate": "1992-05-26", "t_min_receiptdate": "1992-05-09", "t_max_comment": "thely around the bli" }
+, { "t_partkey": 151, "t_count": 24i64, "t_avg_quantity": 4.175d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 21942.756249999995d, "t_avg_discount": 0.045000000000000005d, "t_avg_tax": 0.03291666666666667d, "t_max_shipdate": "1998-08-09", "t_min_commitdate": "1992-02-05", "t_min_receiptdate": "1992-02-13", "t_max_comment": "y unusual foxes " }
+, { "t_partkey": 152, "t_count": 27i64, "t_avg_quantity": 4.970370370370371d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 26147.875925925924d, "t_avg_discount": 0.050370370370370364d, "t_avg_tax": 0.03888888888888889d, "t_max_shipdate": "1998-04-20", "t_min_commitdate": "1992-05-10", "t_min_receiptdate": "1992-07-04", "t_max_comment": "ully. carefully final accounts accordi" }
+, { "t_partkey": 153, "t_count": 35i64, "t_avg_quantity": 5.514285714285715d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 29036.85d, "t_avg_discount": 0.045714285714285714d, "t_avg_tax": 0.03885714285714286d, "t_max_shipdate": "1998-08-17", "t_min_commitdate": "1992-02-18", "t_min_receiptdate": "1992-03-02", "t_max_comment": "y above the bli" }
+, { "t_partkey": 154, "t_count": 30i64, "t_avg_quantity": 4.54d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 23929.205d, "t_avg_discount": 0.04933333333333333d, "t_avg_tax": 0.041666666666666664d, "t_max_shipdate": "1998-09-29", "t_min_commitdate": "1992-03-06", "t_min_receiptdate": "1992-03-01", "t_max_comment": "vely ironic accounts. furiously unusual acc" }
+, { "t_partkey": 155, "t_count": 23i64, "t_avg_quantity": 6.069565217391305d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 32021.508695652174d, "t_avg_discount": 0.0508695652173913d, "t_avg_tax": 0.037391304347826095d, "t_max_shipdate": "1998-07-27", "t_min_commitdate": "1992-10-21", "t_min_receiptdate": "1992-09-30", "t_max_comment": "y regular requests haggle." }
+, { "t_partkey": 156, "t_count": 39i64, "t_avg_quantity": 5.333333333333334d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 28164.0d, "t_avg_discount": 0.0458974358974359d, "t_avg_tax": 0.04410256410256411d, "t_max_shipdate": "1998-08-09", "t_min_commitdate": "1992-02-18", "t_min_receiptdate": "1992-05-03", "t_max_comment": "y regular instructions doze furiously. reg" }
+, { "t_partkey": 157, "t_count": 28i64, "t_avg_quantity": 5.414285714285715d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 28618.560714285715d, "t_avg_discount": 0.05714285714285714d, "t_avg_tax": 0.03964285714285714d, "t_max_shipdate": "1997-11-27", "t_min_commitdate": "1992-06-30", "t_min_receiptdate": "1992-08-01", "t_max_comment": "y regular requests engage furiously final d" }
+, { "t_partkey": 158, "t_count": 25i64, "t_avg_quantity": 5.144d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 27215.618000000002d, "t_avg_discount": 0.044000000000000004d, "t_avg_tax": 0.036800000000000006d, "t_max_shipdate": "1998-07-16", "t_min_commitdate": "1992-06-04", "t_min_receiptdate": "1992-08-07", "t_max_comment": "uctions cajole" }
+, { "t_partkey": 159, "t_count": 32i64, "t_avg_quantity": 4.9625d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 26280.159375000003d, "t_avg_discount": 0.0578125d, "t_avg_tax": 0.043125000000000004d, "t_max_shipdate": "1998-05-25", "t_min_commitdate": "1992-02-10", "t_min_receiptdate": "1992-05-20", "t_max_comment": "y special ideas. express packages pr" }
+, { "t_partkey": 160, "t_count": 42i64, "t_avg_quantity": 4.338095238095238d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 22995.37523809524d, "t_avg_discount": 0.04690476190476191d, "t_avg_tax": 0.03785714285714287d, "t_max_shipdate": "1998-08-14", "t_min_commitdate": "1992-04-07", "t_min_receiptdate": "1992-05-13", "t_max_comment": "yly silent deposits" }
+, { "t_partkey": 161, "t_count": 33i64, "t_avg_quantity": 5.109090909090909d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 27107.814545454545d, "t_avg_discount": 0.04666666666666667d, "t_avg_tax": 0.04606060606060606d, "t_max_shipdate": "1998-09-11", "t_min_commitdate": "1992-04-27", "t_min_receiptdate": "1992-04-09", "t_max_comment": "y ironic pin" }
+, { "t_partkey": 162, "t_count": 42i64, "t_avg_quantity": 4.895238095238096d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 25997.630476190476d, "t_avg_discount": 0.05833333333333335d, "t_avg_tax": 0.03547619047619048d, "t_max_shipdate": "1998-09-18", "t_min_commitdate": "1992-04-27", "t_min_receiptdate": "1992-04-14", "t_max_comment": "y asymptotes. regular depen" }
+, { "t_partkey": 163, "t_count": 28i64, "t_avg_quantity": 5.550000000000001d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 29502.690000000002d, "t_avg_discount": 0.045d, "t_avg_tax": 0.032499999999999994d, "t_max_shipdate": "1998-04-18", "t_min_commitdate": "1992-03-07", "t_min_receiptdate": "1992-03-09", "t_max_comment": "y fluffily stealt" }
+, { "t_partkey": 164, "t_count": 26i64, "t_avg_quantity": 4.915384615384616d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 26153.778461538463d, "t_avg_discount": 0.04076923076923077d, "t_avg_tax": 0.04115384615384616d, "t_max_shipdate": "1998-10-17", "t_min_commitdate": "1992-03-31", "t_min_receiptdate": "1992-04-04", "t_max_comment": "ymptotes boost. furiously bold p" }
+, { "t_partkey": 165, "t_count": 36i64, "t_avg_quantity": 5.561111111111112d, "t_max_suppkey": 10, "t_max_linenumber": 5, "t_avg_extendedprice": 29617.365555555552d, "t_avg_discount": 0.05277777777777778d, "t_avg_tax": 0.03777777777777778d, "t_max_shipdate": "1998-06-07", "t_min_commitdate": "1992-03-17", "t_min_receiptdate": "1992-04-07", "t_max_comment": "y unusual deposits prom" }
+, { "t_partkey": 166, "t_count": 33i64, "t_avg_quantity": 4.830303030303031d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 25749.37939393939d, "t_avg_discount": 0.04666666666666667d, "t_avg_tax": 0.03878787878787879d, "t_max_shipdate": "1998-08-11", "t_min_commitdate": "1992-06-07", "t_min_receiptdate": "1992-08-16", "t_max_comment": "uses detect spec" }
+, { "t_partkey": 167, "t_count": 31i64, "t_avg_quantity": 4.851612903225806d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 25887.236129032255d, "t_avg_discount": 0.052258064516129035d, "t_avg_tax": 0.037096774193548385d, "t_max_shipdate": "1998-05-02", "t_min_commitdate": "1992-05-30", "t_min_receiptdate": "1992-06-08", "t_max_comment": "yly final packages according to the quickl" }
+, { "t_partkey": 168, "t_count": 36i64, "t_avg_quantity": 5.1722222222222225d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 27623.804444444442d, "t_avg_discount": 0.04944444444444445d, "t_avg_tax": 0.03666666666666667d, "t_max_shipdate": "1998-06-26", "t_min_commitdate": "1992-05-20", "t_min_receiptdate": "1992-05-07", "t_max_comment": "xpress requests haggle after the final, fi" }
+, { "t_partkey": 169, "t_count": 35i64, "t_avg_quantity": 5.822857142857143d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 31127.829714285715d, "t_avg_discount": 0.047999999999999994d, "t_avg_tax": 0.038857142857142854d, "t_max_shipdate": "1998-07-30", "t_min_commitdate": "1992-04-18", "t_min_receiptdate": "1992-04-18", "t_max_comment": "yly final theodolites. furi" }
+, { "t_partkey": 170, "t_count": 27i64, "t_avg_quantity": 4.874074074074074d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 26080.43925925926d, "t_avg_discount": 0.050740740740740746d, "t_avg_tax": 0.044814814814814814d, "t_max_shipdate": "1998-10-30", "t_min_commitdate": "1992-06-24", "t_min_receiptdate": "1992-08-13", "t_max_comment": "yly ironic " }
+, { "t_partkey": 171, "t_count": 18i64, "t_avg_quantity": 4.533333333333334d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 24279.853333333333d, "t_avg_discount": 0.04055555555555555d, "t_avg_tax": 0.036666666666666674d, "t_max_shipdate": "1998-07-28", "t_min_commitdate": "1992-10-15", "t_min_receiptdate": "1992-11-11", "t_max_comment": "uriously ironic accounts. ironic, ir" }
+, { "t_partkey": 172, "t_count": 18i64, "t_avg_quantity": 5.1000000000000005d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 27340.335d, "t_avg_discount": 0.05222222222222222d, "t_avg_tax": 0.03722222222222223d, "t_max_shipdate": "1998-08-21", "t_min_commitdate": "1992-09-18", "t_min_receiptdate": "1992-09-26", "t_max_comment": "wake carefully alongside of " }
+, { "t_partkey": 173, "t_count": 34i64, "t_avg_quantity": 5.247058823529412d, "t_max_suppkey": 4, "t_max_linenumber": 7, "t_avg_extendedprice": 28154.930588235293d, "t_avg_discount": 0.054411764705882354d, "t_avg_tax": 0.048529411764705876d, "t_max_shipdate": "1998-09-17", "t_min_commitdate": "1992-06-20", "t_min_receiptdate": "1992-06-21", "t_max_comment": "uses. fluffily fina" }
+, { "t_partkey": 174, "t_count": 31i64, "t_avg_quantity": 5.3419354838709685d, "t_max_suppkey": 5, "t_max_linenumber": 7, "t_avg_extendedprice": 28690.734193548382d, "t_avg_discount": 0.05354838709677419d, "t_avg_tax": 0.046129032258064515d, "t_max_shipdate": "1998-05-31", "t_min_commitdate": "1992-09-05", "t_min_receiptdate": "1992-07-14", "t_max_comment": "y unusual packages thrash pinto " }
+, { "t_partkey": 175, "t_count": 31i64, "t_avg_quantity": 5.658064516129032d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 30416.906129032257d, "t_avg_discount": 0.04548387096774193d, "t_avg_tax": 0.03387096774193549d, "t_max_shipdate": "1998-09-06", "t_min_commitdate": "1992-09-30", "t_min_receiptdate": "1992-10-22", "t_max_comment": "yly special " }
+, { "t_partkey": 176, "t_count": 28i64, "t_avg_quantity": 6.078571428571429d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 32707.88107142857d, "t_avg_discount": 0.06d, "t_avg_tax": 0.03642857142857143d, "t_max_shipdate": "1998-11-11", "t_min_commitdate": "1992-02-28", "t_min_receiptdate": "1992-02-21", "t_max_comment": "y unusual foxes cajole ab" }
+, { "t_partkey": 177, "t_count": 29i64, "t_avg_quantity": 4.675862068965517d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 25183.491724137926d, "t_avg_discount": 0.045517241379310354d, "t_avg_tax": 0.04482758620689655d, "t_max_shipdate": "1998-08-24", "t_min_commitdate": "1992-04-05", "t_min_receiptdate": "1992-05-04", "t_max_comment": "y ironic instructions cajole" }
+, { "t_partkey": 178, "t_count": 41i64, "t_avg_quantity": 5.414634146341464d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 29189.480487804878d, "t_avg_discount": 0.04878048780487805d, "t_avg_tax": 0.038780487804878055d, "t_max_shipdate": "1998-11-11", "t_min_commitdate": "1992-06-01", "t_min_receiptdate": "1992-06-18", "t_max_comment": "yly ironic decoys; regular, iron" }
+, { "t_partkey": 179, "t_count": 19i64, "t_avg_quantity": 6.010526315789474d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 32431.898421052636d, "t_avg_discount": 0.04263157894736842d, "t_avg_tax": 0.02368421052631579d, "t_max_shipdate": "1997-06-03", "t_min_commitdate": "1992-04-18", "t_min_receiptdate": "1992-06-10", "t_max_comment": "y regular pain" }
+, { "t_partkey": 180, "t_count": 29i64, "t_avg_quantity": 4.096551724137931d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 22125.06620689655d, "t_avg_discount": 0.04758620689655172d, "t_avg_tax": 0.036551724137931035d, "t_max_shipdate": "1998-10-28", "t_min_commitdate": "1992-04-02", "t_min_receiptdate": "1992-03-18", "t_max_comment": "y final foxes by the sl" }
+, { "t_partkey": 181, "t_count": 26i64, "t_avg_quantity": 4.307692307692308d, "t_max_suppkey": 2, "t_max_linenumber": 6, "t_avg_extendedprice": 23286.953846153843d, "t_avg_discount": 0.05615384615384615d, "t_avg_tax": 0.05153846153846154d, "t_max_shipdate": "1998-10-23", "t_min_commitdate": "1992-07-25", "t_min_receiptdate": "1992-07-02", "t_max_comment": "ts across the even requests doze furiously" }
+, { "t_partkey": 182, "t_count": 23i64, "t_avg_quantity": 4.234782608695652d, "t_max_suppkey": 3, "t_max_linenumber": 7, "t_avg_extendedprice": 22913.985217391306d, "t_avg_discount": 0.03782608695652174d, "t_avg_tax": 0.036521739130434785d, "t_max_shipdate": "1998-11-04", "t_min_commitdate": "1992-04-21", "t_min_receiptdate": "1992-03-13", "t_max_comment": "yly. express ideas agai" }
+, { "t_partkey": 183, "t_count": 31i64, "t_avg_quantity": 4.851612903225806d, "t_max_suppkey": 4, "t_max_linenumber": 7, "t_avg_extendedprice": 26275.85032258064d, "t_avg_discount": 0.043225806451612905d, "t_avg_tax": 0.04064516129032259d, "t_max_shipdate": "1998-05-26", "t_min_commitdate": "1992-03-21", "t_min_receiptdate": "1992-05-02", "t_max_comment": "y. even excuses" }
+, { "t_partkey": 184, "t_count": 42i64, "t_avg_quantity": 5.380952380952381d, "t_max_suppkey": 5, "t_max_linenumber": 7, "t_avg_extendedprice": 29169.604761904764d, "t_avg_discount": 0.048809523809523817d, "t_avg_tax": 0.035d, "t_max_shipdate": "1998-07-14", "t_min_commitdate": "1992-04-23", "t_min_receiptdate": "1992-04-14", "t_max_comment": "y regular pinto beans. evenly regular packa" }
+, { "t_partkey": 185, "t_count": 21i64, "t_avg_quantity": 4.542857142857144d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 24649.088571428572d, "t_avg_discount": 0.04619047619047619d, "t_avg_tax": 0.042857142857142864d, "t_max_shipdate": "1998-06-16", "t_min_commitdate": "1992-02-11", "t_min_receiptdate": "1992-05-30", "t_max_comment": "unusual theodol" }
+, { "t_partkey": 186, "t_count": 30i64, "t_avg_quantity": 4.206666666666667d, "t_max_suppkey": 7, "t_max_linenumber": 7, "t_avg_extendedprice": 22845.986d, "t_avg_discount": 0.04766666666666667d, "t_avg_tax": 0.044666666666666674d, "t_max_shipdate": "1998-03-06", "t_min_commitdate": "1992-07-07", "t_min_receiptdate": "1992-08-04", "t_max_comment": "ymptotes could u" }
+, { "t_partkey": 187, "t_count": 29i64, "t_avg_quantity": 5.627586206896552d, "t_max_suppkey": 8, "t_max_linenumber": 6, "t_avg_extendedprice": 30590.99586206896d, "t_avg_discount": 0.048965517241379306d, "t_avg_tax": 0.04103448275862069d, "t_max_shipdate": "1998-11-11", "t_min_commitdate": "1992-05-01", "t_min_receiptdate": "1992-04-13", "t_max_comment": "y even forges. fluffily furious accounts" }
+, { "t_partkey": 188, "t_count": 31i64, "t_avg_quantity": 4.2129032258064525d, "t_max_suppkey": 9, "t_max_linenumber": 6, "t_avg_extendedprice": 22921.98516129032d, "t_avg_discount": 0.06483870967741935d, "t_avg_tax": 0.03483870967741936d, "t_max_shipdate": "1998-06-19", "t_min_commitdate": "1992-08-05", "t_min_receiptdate": "1992-10-05", "t_max_comment": "y regular asymptotes doz" }
+, { "t_partkey": 189, "t_count": 33i64, "t_avg_quantity": 4.533333333333334d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 24688.079999999998d, "t_avg_discount": 0.053333333333333344d, "t_avg_tax": 0.03757575757575757d, "t_max_shipdate": "1998-07-26", "t_min_commitdate": "1992-06-08", "t_min_receiptdate": "1992-07-03", "t_max_comment": "y sly theodolites. ironi" }
+, { "t_partkey": 190, "t_count": 39i64, "t_avg_quantity": 4.912820512820513d, "t_max_suppkey": 1, "t_max_linenumber": 7, "t_avg_extendedprice": 26779.538974358973d, "t_avg_discount": 0.04743589743589744d, "t_avg_tax": 0.03538461538461539d, "t_max_shipdate": "1998-09-24", "t_min_commitdate": "1992-05-02", "t_min_receiptdate": "1992-05-11", "t_max_comment": "y final foxes sleep blithely sl" }
+, { "t_partkey": 191, "t_count": 40i64, "t_avg_quantity": 5.5200000000000005d, "t_max_suppkey": 5, "t_max_linenumber": 7, "t_avg_extendedprice": 30116.844d, "t_avg_discount": 0.0475d, "t_avg_tax": 0.04025d, "t_max_shipdate": "1998-10-08", "t_min_commitdate": "1992-06-09", "t_min_receiptdate": "1992-08-09", "t_max_comment": "ys engage. th" }
+, { "t_partkey": 192, "t_count": 29i64, "t_avg_quantity": 4.655172413793103d, "t_max_suppkey": 6, "t_max_linenumber": 7, "t_avg_extendedprice": 25421.66379310345d, "t_avg_discount": 0.04724137931034483d, "t_avg_tax": 0.04586206896551724d, "t_max_shipdate": "1998-05-26", "t_min_commitdate": "1992-04-06", "t_min_receiptdate": "1992-03-02", "t_max_comment": "y. fluffily bold accounts grow. furio" }
+, { "t_partkey": 193, "t_count": 27i64, "t_avg_quantity": 4.4222222222222225d, "t_max_suppkey": 7, "t_max_linenumber": 6, "t_avg_extendedprice": 24171.64555555556d, "t_avg_discount": 0.044814814814814814d, "t_avg_tax": 0.02851851851851852d, "t_max_shipdate": "1998-08-19", "t_min_commitdate": "1992-05-05", "t_min_receiptdate": "1992-06-03", "t_max_comment": "y players sleep along the final, pending " }
+, { "t_partkey": 194, "t_count": 28i64, "t_avg_quantity": 4.457142857142857d, "t_max_suppkey": 8, "t_max_linenumber": 7, "t_avg_extendedprice": 24384.80571428571d, "t_avg_discount": 0.04071428571428572d, "t_avg_tax": 0.031785714285714285d, "t_max_shipdate": "1998-07-06", "t_min_commitdate": "1992-03-18", "t_min_receiptdate": "1992-02-23", "t_max_comment": "y silent requests. regular, even accounts" }
+, { "t_partkey": 195, "t_count": 30i64, "t_avg_quantity": 5.053333333333334d, "t_max_suppkey": 9, "t_max_linenumber": 7, "t_avg_extendedprice": 27671.800666666666d, "t_avg_discount": 0.04833333333333333d, "t_avg_tax": 0.045000000000000005d, "t_max_shipdate": "1998-01-21", "t_min_commitdate": "1992-02-12", "t_min_receiptdate": "1992-05-05", "t_max_comment": "yly pending packages snooz" }
+, { "t_partkey": 196, "t_count": 36i64, "t_avg_quantity": 5.011111111111112d, "t_max_suppkey": 10, "t_max_linenumber": 6, "t_avg_extendedprice": 27465.649444444443d, "t_avg_discount": 0.04972222222222223d, "t_avg_tax": 0.03944444444444444d, "t_max_shipdate": "1998-10-17", "t_min_commitdate": "1992-03-14", "t_min_receiptdate": "1992-03-27", "t_max_comment": "y quickly " }
+, { "t_partkey": 197, "t_count": 32i64, "t_avg_quantity": 5.2125d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 28595.514375d, "t_avg_discount": 0.0553125d, "t_avg_tax": 0.0378125d, "t_max_shipdate": "1998-05-19", "t_min_commitdate": "1993-09-09", "t_min_receiptdate": "1993-08-23", "t_max_comment": "warhorses slee" }
+, { "t_partkey": 198, "t_count": 31i64, "t_avg_quantity": 4.587096774193548d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 25187.519032258064d, "t_avg_discount": 0.03967741935483871d, "t_avg_tax": 0.035806451612903224d, "t_max_shipdate": "1998-10-06", "t_min_commitdate": "1992-02-23", "t_min_receiptdate": "1992-05-15", "t_max_comment": "y even accounts. quickly bold decoys" }
+, { "t_partkey": 199, "t_count": 32i64, "t_avg_quantity": 5.5062500000000005d, "t_max_suppkey": 10, "t_max_linenumber": 7, "t_avg_extendedprice": 30262.0746875d, "t_avg_discount": 0.052812500000000005d, "t_avg_tax": 0.043750000000000004d, "t_max_shipdate": "1998-08-14", "t_min_commitdate": "1992-05-13", "t_min_receiptdate": "1992-03-28", "t_max_comment": "y carefully ironi" }
+, { "t_partkey": 200, "t_count": 24i64, "t_avg_quantity": 5.458333333333334d, "t_max_suppkey": 4, "t_max_linenumber": 7, "t_avg_extendedprice": 30026.291666666668d, "t_avg_discount": 0.049166666666666664d, "t_avg_tax": 0.03375d, "t_max_shipdate": "1998-09-04", "t_min_commitdate": "1992-05-28", "t_min_receiptdate": "1992-05-12", "t_max_comment": "y silent foxes! carefully ruthless cour" }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.adm
new file mode 100644
index 0000000..48b59a7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q17_small_quantity_order_revenue/q17_small_quantity_order_revenue.1.adm
@@ -0,0 +1,2 @@
+[ 863.2285714285715d
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.1.adm
new file mode 100644
index 0000000..e68d6e2
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q18_large_volume_customer/q18_large_volume_customer.1.adm
@@ -0,0 +1,101 @@
+[ { "c_name": "Customer#000000070", "c_custkey": 70, "o_orderkey": 2567, "o_orderdate": "1998-02-27", "o_totalprice": 263411.29d, "sum_quantity": 266 }
+, { "c_name": "Customer#000000010", "c_custkey": 10, "o_orderkey": 4421, "o_orderdate": "1997-04-04", "o_totalprice": 258779.02d, "sum_quantity": 255 }
+, { "c_name": "Customer#000000052", "c_custkey": 52, "o_orderkey": 5765, "o_orderdate": "1994-12-15", "o_totalprice": 249900.42d, "sum_quantity": 247 }
+, { "c_name": "Customer#000000082", "c_custkey": 82, "o_orderkey": 3460, "o_orderdate": "1995-10-03", "o_totalprice": 245976.74d, "sum_quantity": 254 }
+, { "c_name": "Customer#000000068", "c_custkey": 68, "o_orderkey": 2208, "o_orderdate": "1995-05-01", "o_totalprice": 245388.06d, "sum_quantity": 256 }
+, { "c_name": "Customer#000000028", "c_custkey": 28, "o_orderkey": 2306, "o_orderdate": "1995-07-26", "o_totalprice": 244704.23d, "sum_quantity": 235 }
+, { "c_name": "Customer#000000146", "c_custkey": 146, "o_orderkey": 5925, "o_orderdate": "1995-11-13", "o_totalprice": 242588.87d, "sum_quantity": 242 }
+, { "c_name": "Customer#000000029", "c_custkey": 29, "o_orderkey": 1121, "o_orderdate": "1997-01-13", "o_totalprice": 241837.88d, "sum_quantity": 242 }
+, { "c_name": "Customer#000000067", "c_custkey": 67, "o_orderkey": 3907, "o_orderdate": "1992-08-19", "o_totalprice": 240457.56d, "sum_quantity": 239 }
+, { "c_name": "Customer#000000076", "c_custkey": 76, "o_orderkey": 5158, "o_orderdate": "1997-01-21", "o_totalprice": 240284.95d, "sum_quantity": 248 }
+, { "c_name": "Customer#000000131", "c_custkey": 131, "o_orderkey": 4484, "o_orderdate": "1996-12-24", "o_totalprice": 237947.61d, "sum_quantity": 243 }
+, { "c_name": "Customer#000000115", "c_custkey": 115, "o_orderkey": 645, "o_orderdate": "1994-12-03", "o_totalprice": 234763.73d, "sum_quantity": 245 }
+, { "c_name": "Customer#000000049", "c_custkey": 49, "o_orderkey": 4294, "o_orderdate": "1992-08-15", "o_totalprice": 232194.74d, "sum_quantity": 225 }
+, { "c_name": "Customer#000000076", "c_custkey": 76, "o_orderkey": 1477, "o_orderdate": "1997-08-24", "o_totalprice": 231831.35d, "sum_quantity": 236 }
+, { "c_name": "Customer#000000044", "c_custkey": 44, "o_orderkey": 4645, "o_orderdate": "1994-09-20", "o_totalprice": 231012.22d, "sum_quantity": 248 }
+, { "c_name": "Customer#000000089", "c_custkey": 89, "o_orderkey": 5957, "o_orderdate": "1993-12-27", "o_totalprice": 230949.45d, "sum_quantity": 242 }
+, { "c_name": "Customer#000000076", "c_custkey": 76, "o_orderkey": 326, "o_orderdate": "1995-06-04", "o_totalprice": 229165.17d, "sum_quantity": 228 }
+, { "c_name": "Customer#000000067", "c_custkey": 67, "o_orderkey": 928, "o_orderdate": "1995-03-02", "o_totalprice": 228136.49d, "sum_quantity": 241 }
+, { "c_name": "Customer#000000079", "c_custkey": 79, "o_orderkey": 3808, "o_orderdate": "1994-04-24", "o_totalprice": 228054.01d, "sum_quantity": 227 }
+, { "c_name": "Customer#000000037", "c_custkey": 37, "o_orderkey": 5317, "o_orderdate": "1994-09-09", "o_totalprice": 228002.51d, "sum_quantity": 231 }
+, { "c_name": "Customer#000000004", "c_custkey": 4, "o_orderkey": 358, "o_orderdate": "1993-09-20", "o_totalprice": 226806.66d, "sum_quantity": 223 }
+, { "c_name": "Customer#000000142", "c_custkey": 142, "o_orderkey": 5699, "o_orderdate": "1992-07-30", "o_totalprice": 226314.91d, "sum_quantity": 240 }
+, { "c_name": "Customer#000000121", "c_custkey": 121, "o_orderkey": 1888, "o_orderdate": "1993-10-31", "o_totalprice": 224724.11d, "sum_quantity": 225 }
+, { "c_name": "Customer#000000094", "c_custkey": 94, "o_orderkey": 2690, "o_orderdate": "1996-03-31", "o_totalprice": 224674.27d, "sum_quantity": 219 }
+, { "c_name": "Customer#000000094", "c_custkey": 94, "o_orderkey": 5413, "o_orderdate": "1997-10-17", "o_totalprice": 224382.57d, "sum_quantity": 212 }
+, { "c_name": "Customer#000000032", "c_custkey": 32, "o_orderkey": 5381, "o_orderdate": "1993-01-29", "o_totalprice": 223995.46d, "sum_quantity": 228 }
+, { "c_name": "Customer#000000145", "c_custkey": 145, "o_orderkey": 518, "o_orderdate": "1998-02-08", "o_totalprice": 223537.09d, "sum_quantity": 214 }
+, { "c_name": "Customer#000000029", "c_custkey": 29, "o_orderkey": 2945, "o_orderdate": "1996-01-03", "o_totalprice": 223507.72d, "sum_quantity": 231 }
+, { "c_name": "Customer#000000007", "c_custkey": 7, "o_orderkey": 3654, "o_orderdate": "1992-06-03", "o_totalprice": 222653.54d, "sum_quantity": 222 }
+, { "c_name": "Customer#000000145", "c_custkey": 145, "o_orderkey": 807, "o_orderdate": "1993-11-24", "o_totalprice": 222392.53d, "sum_quantity": 216 }
+, { "c_name": "Customer#000000149", "c_custkey": 149, "o_orderkey": 3619, "o_orderdate": "1996-11-20", "o_totalprice": 222274.54d, "sum_quantity": 221 }
+, { "c_name": "Customer#000000070", "c_custkey": 70, "o_orderkey": 5472, "o_orderdate": "1993-04-11", "o_totalprice": 221636.83d, "sum_quantity": 217 }
+, { "c_name": "Customer#000000137", "c_custkey": 137, "o_orderkey": 4900, "o_orderdate": "1992-06-30", "o_totalprice": 221320.76d, "sum_quantity": 227 }
+, { "c_name": "Customer#000000106", "c_custkey": 106, "o_orderkey": 3778, "o_orderdate": "1993-05-26", "o_totalprice": 221036.31d, "sum_quantity": 225 }
+, { "c_name": "Customer#000000121", "c_custkey": 121, "o_orderkey": 1153, "o_orderdate": "1996-04-18", "o_totalprice": 220727.97d, "sum_quantity": 209 }
+, { "c_name": "Customer#000000070", "c_custkey": 70, "o_orderkey": 4004, "o_orderdate": "1993-05-07", "o_totalprice": 220715.14d, "sum_quantity": 228 }
+, { "c_name": "Customer#000000098", "c_custkey": 98, "o_orderkey": 768, "o_orderdate": "1996-08-20", "o_totalprice": 220636.82d, "sum_quantity": 231 }
+, { "c_name": "Customer#000000149", "c_custkey": 149, "o_orderkey": 5606, "o_orderdate": "1996-11-12", "o_totalprice": 219959.08d, "sum_quantity": 231 }
+, { "c_name": "Customer#000000055", "c_custkey": 55, "o_orderkey": 484, "o_orderdate": "1997-01-03", "o_totalprice": 219920.62d, "sum_quantity": 224 }
+, { "c_name": "Customer#000000140", "c_custkey": 140, "o_orderkey": 4230, "o_orderdate": "1992-03-04", "o_totalprice": 219709.6d, "sum_quantity": 217 }
+, { "c_name": "Customer#000000082", "c_custkey": 82, "o_orderkey": 39, "o_orderdate": "1996-09-20", "o_totalprice": 219707.84d, "sum_quantity": 231 }
+, { "c_name": "Customer#000000037", "c_custkey": 37, "o_orderkey": 2789, "o_orderdate": "1998-03-14", "o_totalprice": 219123.27d, "sum_quantity": 218 }
+, { "c_name": "Customer#000000017", "c_custkey": 17, "o_orderkey": 3269, "o_orderdate": "1996-03-01", "o_totalprice": 218697.85d, "sum_quantity": 220 }
+, { "c_name": "Customer#000000149", "c_custkey": 149, "o_orderkey": 3590, "o_orderdate": "1995-05-13", "o_totalprice": 218482.7d, "sum_quantity": 210 }
+, { "c_name": "Customer#000000134", "c_custkey": 134, "o_orderkey": 614, "o_orderdate": "1992-12-01", "o_totalprice": 218116.21d, "sum_quantity": 204 }
+, { "c_name": "Customer#000000092", "c_custkey": 92, "o_orderkey": 4197, "o_orderdate": "1996-08-13", "o_totalprice": 217709.03d, "sum_quantity": 225 }
+, { "c_name": "Customer#000000133", "c_custkey": 133, "o_orderkey": 1156, "o_orderdate": "1996-10-19", "o_totalprice": 217682.81d, "sum_quantity": 218 }
+, { "c_name": "Customer#000000046", "c_custkey": 46, "o_orderkey": 453, "o_orderdate": "1997-05-26", "o_totalprice": 216826.73d, "sum_quantity": 226 }
+, { "c_name": "Customer#000000124", "c_custkey": 124, "o_orderkey": 3109, "o_orderdate": "1993-07-24", "o_totalprice": 216104.85d, "sum_quantity": 210 }
+, { "c_name": "Customer#000000043", "c_custkey": 43, "o_orderkey": 4994, "o_orderdate": "1996-06-29", "o_totalprice": 216071.76d, "sum_quantity": 213 }
+, { "c_name": "Customer#000000149", "c_custkey": 149, "o_orderkey": 3713, "o_orderdate": "1998-05-07", "o_totalprice": 215342.63d, "sum_quantity": 213 }
+, { "c_name": "Customer#000000029", "c_custkey": 29, "o_orderkey": 68, "o_orderdate": "1998-04-18", "o_totalprice": 215135.72d, "sum_quantity": 213 }
+, { "c_name": "Customer#000000013", "c_custkey": 13, "o_orderkey": 2438, "o_orderdate": "1993-07-15", "o_totalprice": 214494.39d, "sum_quantity": 210 }
+, { "c_name": "Customer#000000133", "c_custkey": 133, "o_orderkey": 4613, "o_orderdate": "1998-03-05", "o_totalprice": 212339.55d, "sum_quantity": 214 }
+, { "c_name": "Customer#000000106", "c_custkey": 106, "o_orderkey": 1761, "o_orderdate": "1993-12-24", "o_totalprice": 211925.95d, "sum_quantity": 218 }
+, { "c_name": "Customer#000000049", "c_custkey": 49, "o_orderkey": 1248, "o_orderdate": "1992-01-02", "o_totalprice": 210713.88d, "sum_quantity": 207 }
+, { "c_name": "Customer#000000005", "c_custkey": 5, "o_orderkey": 5859, "o_orderdate": "1997-04-23", "o_totalprice": 210643.96d, "sum_quantity": 211 }
+, { "c_name": "Customer#000000106", "c_custkey": 106, "o_orderkey": 1827, "o_orderdate": "1996-06-22", "o_totalprice": 210113.88d, "sum_quantity": 205 }
+, { "c_name": "Customer#000000085", "c_custkey": 85, "o_orderkey": 5184, "o_orderdate": "1998-07-20", "o_totalprice": 209155.48d, "sum_quantity": 213 }
+, { "c_name": "Customer#000000133", "c_custkey": 133, "o_orderkey": 710, "o_orderdate": "1993-01-02", "o_totalprice": 208974.42d, "sum_quantity": 196 }
+, { "c_name": "Customer#000000052", "c_custkey": 52, "o_orderkey": 5186, "o_orderdate": "1996-08-03", "o_totalprice": 208892.63d, "sum_quantity": 210 }
+, { "c_name": "Customer#000000028", "c_custkey": 28, "o_orderkey": 2050, "o_orderdate": "1994-06-02", "o_totalprice": 208517.98d, "sum_quantity": 217 }
+, { "c_name": "Customer#000000076", "c_custkey": 76, "o_orderkey": 2180, "o_orderdate": "1996-09-14", "o_totalprice": 208481.57d, "sum_quantity": 212 }
+, { "c_name": "Customer#000000119", "c_custkey": 119, "o_orderkey": 3588, "o_orderdate": "1995-03-19", "o_totalprice": 207925.83d, "sum_quantity": 212 }
+, { "c_name": "Customer#000000134", "c_custkey": 134, "o_orderkey": 1444, "o_orderdate": "1994-12-06", "o_totalprice": 207907.6d, "sum_quantity": 205 }
+, { "c_name": "Customer#000000103", "c_custkey": 103, "o_orderkey": 742, "o_orderdate": "1994-12-23", "o_totalprice": 207632.55d, "sum_quantity": 198 }
+, { "c_name": "Customer#000000017", "c_custkey": 17, "o_orderkey": 4099, "o_orderdate": "1992-08-21", "o_totalprice": 207364.8d, "sum_quantity": 208 }
+, { "c_name": "Customer#000000109", "c_custkey": 109, "o_orderkey": 1286, "o_orderdate": "1993-05-14", "o_totalprice": 207291.83d, "sum_quantity": 200 }
+, { "c_name": "Customer#000000079", "c_custkey": 79, "o_orderkey": 5633, "o_orderdate": "1998-05-31", "o_totalprice": 207119.83d, "sum_quantity": 203 }
+, { "c_name": "Customer#000000062", "c_custkey": 62, "o_orderkey": 2022, "o_orderdate": "1992-03-15", "o_totalprice": 206742.11d, "sum_quantity": 209 }
+, { "c_name": "Customer#000000022", "c_custkey": 22, "o_orderkey": 4583, "o_orderdate": "1994-09-25", "o_totalprice": 206495.43d, "sum_quantity": 197 }
+, { "c_name": "Customer#000000148", "c_custkey": 148, "o_orderkey": 5185, "o_orderdate": "1997-07-25", "o_totalprice": 206179.68d, "sum_quantity": 198 }
+, { "c_name": "Customer#000000044", "c_custkey": 44, "o_orderkey": 3175, "o_orderdate": "1994-07-15", "o_totalprice": 205282.63d, "sum_quantity": 215 }
+, { "c_name": "Customer#000000056", "c_custkey": 56, "o_orderkey": 2565, "o_orderdate": "1998-02-28", "o_totalprice": 204438.57d, "sum_quantity": 201 }
+, { "c_name": "Customer#000000149", "c_custkey": 149, "o_orderkey": 3747, "o_orderdate": "1996-08-20", "o_totalprice": 204355.65d, "sum_quantity": 195 }
+, { "c_name": "Customer#000000101", "c_custkey": 101, "o_orderkey": 4964, "o_orderdate": "1997-07-28", "o_totalprice": 204163.1d, "sum_quantity": 197 }
+, { "c_name": "Customer#000000062", "c_custkey": 62, "o_orderkey": 4992, "o_orderdate": "1992-05-10", "o_totalprice": 203904.8d, "sum_quantity": 198 }
+, { "c_name": "Customer#000000010", "c_custkey": 10, "o_orderkey": 3751, "o_orderdate": "1994-04-27", "o_totalprice": 202917.72d, "sum_quantity": 204 }
+, { "c_name": "Customer#000000076", "c_custkey": 76, "o_orderkey": 2534, "o_orderdate": "1996-07-17", "o_totalprice": 202784.54d, "sum_quantity": 214 }
+, { "c_name": "Customer#000000001", "c_custkey": 1, "o_orderkey": 164, "o_orderdate": "1992-10-21", "o_totalprice": 202660.52d, "sum_quantity": 213 }
+, { "c_name": "Customer#000000118", "c_custkey": 118, "o_orderkey": 1283, "o_orderdate": "1996-08-30", "o_totalprice": 202623.92d, "sum_quantity": 200 }
+, { "c_name": "Customer#000000010", "c_custkey": 10, "o_orderkey": 1890, "o_orderdate": "1996-12-18", "o_totalprice": 202364.58d, "sum_quantity": 207 }
+, { "c_name": "Customer#000000077", "c_custkey": 77, "o_orderkey": 1762, "o_orderdate": "1994-08-20", "o_totalprice": 202227.17d, "sum_quantity": 216 }
+, { "c_name": "Customer#000000106", "c_custkey": 106, "o_orderkey": 4196, "o_orderdate": "1998-05-15", "o_totalprice": 201455.98d, "sum_quantity": 198 }
+, { "c_name": "Customer#000000064", "c_custkey": 64, "o_orderkey": 5895, "o_orderdate": "1997-01-01", "o_totalprice": 201419.83d, "sum_quantity": 200 }
+, { "c_name": "Customer#000000008", "c_custkey": 8, "o_orderkey": 644, "o_orderdate": "1992-05-01", "o_totalprice": 201268.06d, "sum_quantity": 202 }
+, { "c_name": "Customer#000000047", "c_custkey": 47, "o_orderkey": 261, "o_orderdate": "1993-06-29", "o_totalprice": 201003.12d, "sum_quantity": 200 }
+, { "c_name": "Customer#000000079", "c_custkey": 79, "o_orderkey": 4672, "o_orderdate": "1995-11-07", "o_totalprice": 199593.71d, "sum_quantity": 203 }
+, { "c_name": "Customer#000000131", "c_custkey": 131, "o_orderkey": 930, "o_orderdate": "1994-12-17", "o_totalprice": 199102.23d, "sum_quantity": 204 }
+, { "c_name": "Customer#000000118", "c_custkey": 118, "o_orderkey": 4161, "o_orderdate": "1993-08-21", "o_totalprice": 198995.21d, "sum_quantity": 211 }
+, { "c_name": "Customer#000000073", "c_custkey": 73, "o_orderkey": 4069, "o_orderdate": "1992-05-13", "o_totalprice": 198816.13d, "sum_quantity": 199 }
+, { "c_name": "Customer#000000142", "c_custkey": 142, "o_orderkey": 5696, "o_orderdate": "1995-05-04", "o_totalprice": 198723.3d, "sum_quantity": 198 }
+, { "c_name": "Customer#000000134", "c_custkey": 134, "o_orderkey": 3872, "o_orderdate": "1996-09-06", "o_totalprice": 198538.68d, "sum_quantity": 207 }
+, { "c_name": "Customer#000000127", "c_custkey": 127, "o_orderkey": 1059, "o_orderdate": "1994-02-27", "o_totalprice": 198360.22d, "sum_quantity": 194 }
+, { "c_name": "Customer#000000103", "c_custkey": 103, "o_orderkey": 4293, "o_orderdate": "1996-08-20", "o_totalprice": 198322.91d, "sum_quantity": 202 }
+, { "c_name": "Customer#000000080", "c_custkey": 80, "o_orderkey": 993, "o_orderdate": "1995-09-10", "o_totalprice": 198238.65d, "sum_quantity": 194 }
+, { "c_name": "Customer#000000091", "c_custkey": 91, "o_orderkey": 420, "o_orderdate": "1995-10-31", "o_totalprice": 198039.23d, "sum_quantity": 200 }
+, { "c_name": "Customer#000000092", "c_custkey": 92, "o_orderkey": 3333, "o_orderdate": "1992-09-16", "o_totalprice": 197973.22d, "sum_quantity": 195 }
+, { "c_name": "Customer#000000146", "c_custkey": 146, "o_orderkey": 4192, "o_orderdate": "1998-04-19", "o_totalprice": 197192.95d, "sum_quantity": 209 }
+, { "c_name": "Customer#000000145", "c_custkey": 145, "o_orderkey": 1575, "o_orderdate": "1995-09-13", "o_totalprice": 197031.52d, "sum_quantity": 204 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.1.adm
new file mode 100644
index 0000000..e3d3680
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q19_discounted_revenue/q19_discounted_revenue.1.adm
@@ -0,0 +1,2 @@
+[ 51515.7344d
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.1.adm
new file mode 100644
index 0000000..3727b19
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q20_potential_part_promotion/q20_potential_part_promotion.1.adm
@@ -0,0 +1,11 @@
+[ { "s_name": "Supplier#000000001", "s_address": " N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ" }
+, { "s_name": "Supplier#000000002", "s_address": "89eJ5ksX3ImxJQBvxObC," }
+, { "s_name": "Supplier#000000003", "s_address": "q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3" }
+, { "s_name": "Supplier#000000004", "s_address": "Bk7ah4CK8SYQTepEmvMkkgMwg" }
+, { "s_name": "Supplier#000000005", "s_address": "Gcdm2rJRzl5qlTVzc" }
+, { "s_name": "Supplier#000000006", "s_address": "tQxuVm7s7CnK" }
+, { "s_name": "Supplier#000000007", "s_address": "s,4TicNGB4uO6PaSqNBUq" }
+, { "s_name": "Supplier#000000008", "s_address": "9Sq4bBH2FQEmaFOocY45sRTxo6yuoG" }
+, { "s_name": "Supplier#000000009", "s_address": "1KhUgZegwM3ua7dsYmekYBsK" }
+, { "s_name": "Supplier#000000010", "s_address": "Saygah3gYWMp72i PY" }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm
new file mode 100644
index 0000000..4a070c6
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm
@@ -0,0 +1,11 @@
+[ { "s_name": "Supplier#000000007", "numwait": 431i64 }
+, { "s_name": "Supplier#000000005", "numwait": 417i64 }
+, { "s_name": "Supplier#000000001", "numwait": 403i64 }
+, { "s_name": "Supplier#000000009", "numwait": 373i64 }
+, { "s_name": "Supplier#000000004", "numwait": 367i64 }
+, { "s_name": "Supplier#000000002", "numwait": 364i64 }
+, { "s_name": "Supplier#000000010", "numwait": 358i64 }
+, { "s_name": "Supplier#000000003", "numwait": 349i64 }
+, { "s_name": "Supplier#000000008", "numwait": 347i64 }
+, { "s_name": "Supplier#000000006", "numwait": 343i64 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm
new file mode 100644
index 0000000..dce0fd7
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm
@@ -0,0 +1,24 @@
+[ { "cntrycode": "10", "numcust": 3i64, "totacctbal": 20747.13d }
+, { "cntrycode": "11", "numcust": 5i64, "totacctbal": 35208.88d }
+, { "cntrycode": "12", "numcust": 2i64, "totacctbal": 13735.27d }
+, { "cntrycode": "13", "numcust": 2i64, "totacctbal": 13545.3d }
+, { "cntrycode": "14", "numcust": 1i64, "totacctbal": 9963.15d }
+, { "cntrycode": "15", "numcust": 2i64, "totacctbal": 14624.84d }
+, { "cntrycode": "16", "numcust": 2i64, "totacctbal": 11239.02d }
+, { "cntrycode": "17", "numcust": 1i64, "totacctbal": 9127.27d }
+, { "cntrycode": "18", "numcust": 3i64, "totacctbal": 22156.91d }
+, { "cntrycode": "19", "numcust": 6i64, "totacctbal": 43758.41d }
+, { "cntrycode": "20", "numcust": 3i64, "totacctbal": 23085.67d }
+, { "cntrycode": "21", "numcust": 3i64, "totacctbal": 19400.52d }
+, { "cntrycode": "22", "numcust": 3i64, "totacctbal": 20332.18d }
+, { "cntrycode": "23", "numcust": 3i64, "totacctbal": 25483.06d }
+, { "cntrycode": "25", "numcust": 3i64, "totacctbal": 19038.36d }
+, { "cntrycode": "26", "numcust": 5i64, "totacctbal": 38943.9d }
+, { "cntrycode": "27", "numcust": 2i64, "totacctbal": 13248.06d }
+, { "cntrycode": "28", "numcust": 5i64, "totacctbal": 42700.5d }
+, { "cntrycode": "29", "numcust": 4i64, "totacctbal": 36059.01d }
+, { "cntrycode": "30", "numcust": 2i64, "totacctbal": 17528.46d }
+, { "cntrycode": "31", "numcust": 3i64, "totacctbal": 23599.109999999997d }
+, { "cntrycode": "32", "numcust": 4i64, "totacctbal": 25754.22d }
+, { "cntrycode": "33", "numcust": 3i64, "totacctbal": 20359.59d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue601/query-issue601.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue601/query-issue601.1.adm
new file mode 100644
index 0000000..5dd52b1
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue601/query-issue601.1.adm
@@ -0,0 +1,8 @@
+[ { "l_linenumber": 1, "count_order": 1500i64 }
+, { "l_linenumber": 2, "count_order": 1291i64 }
+, { "l_linenumber": 3, "count_order": 1077i64 }
+, { "l_linenumber": 6, "count_order": 432i64 }
+, { "l_linenumber": 7, "count_order": 211i64 }
+, { "l_linenumber": 4, "count_order": 862i64 }
+, { "l_linenumber": 5, "count_order": 632i64 }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue638/query-issue638.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue638/query-issue638.1.adm
new file mode 100644
index 0000000..d13d4f5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue638/query-issue638.1.adm
@@ -0,0 +1,60 @@
+[ { "nation": "ARGENTINA", "o_year": 1997, "sum_profit": 18247.873399999993d }
+, { "nation": "ARGENTINA", "o_year": 1996, "sum_profit": 7731.089399999995d }
+, { "nation": "ARGENTINA", "o_year": 1995, "sum_profit": 134490.5697d }
+, { "nation": "ARGENTINA", "o_year": 1994, "sum_profit": 36767.101500000004d }
+, { "nation": "ARGENTINA", "o_year": 1993, "sum_profit": 35857.08d }
+, { "nation": "ARGENTINA", "o_year": 1992, "sum_profit": 35740.0d }
+, { "nation": "ETHIOPIA", "o_year": 1998, "sum_profit": 2758.7801999999992d }
+, { "nation": "ETHIOPIA", "o_year": 1997, "sum_profit": 19419.294599999994d }
+, { "nation": "ETHIOPIA", "o_year": 1995, "sum_profit": 51231.87439999999d }
+, { "nation": "ETHIOPIA", "o_year": 1994, "sum_profit": 3578.9478999999974d }
+, { "nation": "ETHIOPIA", "o_year": 1992, "sum_profit": 1525.8234999999986d }
+, { "nation": "IRAN", "o_year": 1998, "sum_profit": 37817.229600000006d }
+, { "nation": "IRAN", "o_year": 1997, "sum_profit": 52643.77359999999d }
+, { "nation": "IRAN", "o_year": 1996, "sum_profit": 70143.77609999999d }
+, { "nation": "IRAN", "o_year": 1995, "sum_profit": 84094.58260000001d }
+, { "nation": "IRAN", "o_year": 1994, "sum_profit": 18140.925599999995d }
+, { "nation": "IRAN", "o_year": 1993, "sum_profit": 78655.1676d }
+, { "nation": "IRAN", "o_year": 1992, "sum_profit": 87142.2396d }
+, { "nation": "IRAQ", "o_year": 1998, "sum_profit": 22860.8082d }
+, { "nation": "IRAQ", "o_year": 1997, "sum_profit": 93676.24359999999d }
+, { "nation": "IRAQ", "o_year": 1996, "sum_profit": 45103.3242d }
+, { "nation": "IRAQ", "o_year": 1994, "sum_profit": 36010.728599999995d }
+, { "nation": "IRAQ", "o_year": 1993, "sum_profit": 33221.9399d }
+, { "nation": "IRAQ", "o_year": 1992, "sum_profit": 47755.05900000001d }
+, { "nation": "KENYA", "o_year": 1998, "sum_profit": 44194.831999999995d }
+, { "nation": "KENYA", "o_year": 1997, "sum_profit": 57578.3626d }
+, { "nation": "KENYA", "o_year": 1996, "sum_profit": 59195.9021d }
+, { "nation": "KENYA", "o_year": 1995, "sum_profit": 79262.6278d }
+, { "nation": "KENYA", "o_year": 1994, "sum_profit": 102360.66609999999d }
+, { "nation": "KENYA", "o_year": 1993, "sum_profit": 128422.01959999999d }
+, { "nation": "KENYA", "o_year": 1992, "sum_profit": 181517.20890000003d }
+, { "nation": "MOROCCO", "o_year": 1998, "sum_profit": 41797.823199999984d }
+, { "nation": "MOROCCO", "o_year": 1997, "sum_profit": 23685.801799999997d }
+, { "nation": "MOROCCO", "o_year": 1996, "sum_profit": 62115.19579999999d }
+, { "nation": "MOROCCO", "o_year": 1995, "sum_profit": 42442.64300000001d }
+, { "nation": "MOROCCO", "o_year": 1994, "sum_profit": 48655.87800000001d }
+, { "nation": "MOROCCO", "o_year": 1993, "sum_profit": 22926.744400000003d }
+, { "nation": "MOROCCO", "o_year": 1992, "sum_profit": 32239.8088d }
+, { "nation": "PERU", "o_year": 1998, "sum_profit": 86999.36459999997d }
+, { "nation": "PERU", "o_year": 1997, "sum_profit": 121110.41070000001d }
+, { "nation": "PERU", "o_year": 1996, "sum_profit": 177040.40759999998d }
+, { "nation": "PERU", "o_year": 1995, "sum_profit": 122247.94519999999d }
+, { "nation": "PERU", "o_year": 1994, "sum_profit": 88046.2533d }
+, { "nation": "PERU", "o_year": 1993, "sum_profit": 49379.813799999996d }
+, { "nation": "PERU", "o_year": 1992, "sum_profit": 80646.86050000001d }
+, { "nation": "UNITED KINGDOM", "o_year": 1998, "sum_profit": 50577.25560000001d }
+, { "nation": "UNITED KINGDOM", "o_year": 1997, "sum_profit": 114288.86049999998d }
+, { "nation": "UNITED KINGDOM", "o_year": 1996, "sum_profit": 147684.46480000002d }
+, { "nation": "UNITED KINGDOM", "o_year": 1995, "sum_profit": 225267.6576d }
+, { "nation": "UNITED KINGDOM", "o_year": 1994, "sum_profit": 140595.58639999997d }
+, { "nation": "UNITED KINGDOM", "o_year": 1993, "sum_profit": 322548.49210000003d }
+, { "nation": "UNITED KINGDOM", "o_year": 1992, "sum_profit": 67747.88279999999d }
+, { "nation": "UNITED STATES", "o_year": 1998, "sum_profit": 3957.0431999999996d }
+, { "nation": "UNITED STATES", "o_year": 1997, "sum_profit": 94729.5704d }
+, { "nation": "UNITED STATES", "o_year": 1996, "sum_profit": 79297.8567d }
+, { "nation": "UNITED STATES", "o_year": 1995, "sum_profit": 62201.23360000001d }
+, { "nation": "UNITED STATES", "o_year": 1994, "sum_profit": 43075.62989999999d }
+, { "nation": "UNITED STATES", "o_year": 1993, "sum_profit": 27168.486199999996d }
+, { "nation": "UNITED STATES", "o_year": 1992, "sum_profit": 34092.366d }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue785-2/query-issue785-2.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue785-2/query-issue785-2.1.adm
new file mode 100644
index 0000000..4837987
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue785-2/query-issue785-2.1.adm
@@ -0,0 +1,11 @@
+[ { "nation_key": 1, "sum_price": [ { "orderdate": "1993-05-26", "sum_price": 221036.31d }, { "orderdate": "1992-03-20", "sum_price": 216230.27000000002d }, { "orderdate": "1993-12-24", "sum_price": 211925.95d } ] }
+, { "nation_key": 2, "sum_price": [ { "orderdate": "1996-03-01", "sum_price": 218697.85d }, { "orderdate": "1996-08-13", "sum_price": 217709.03d }, { "orderdate": "1992-08-21", "sum_price": 207364.8d } ] }
+, { "nation_key": 19, "sum_price": [ { "orderdate": "1993-12-29", "sum_price": 328959.87d }, { "orderdate": "1997-08-04", "sum_price": 244636.7d }, { "orderdate": "1996-11-20", "sum_price": 222274.54d } ] }
+, { "nation_key": 21, "sum_price": [ { "orderdate": "1994-02-27", "sum_price": 198360.22d }, { "orderdate": "1992-07-07", "sum_price": 180692.9d }, { "orderdate": "1996-06-28", "sum_price": 139915.23d } ] }
+, { "nation_key": 3, "sum_price": [ { "orderdate": "1997-04-23", "sum_price": 351762.82999999996d }, { "orderdate": "1995-11-13", "sum_price": 242588.87d }, { "orderdate": "1993-07-15", "sum_price": 214494.39d } ] }
+, { "nation_key": 23, "sum_price": [ { "orderdate": "1993-06-08", "sum_price": 161307.05d }, { "orderdate": "1995-12-07", "sum_price": 153048.74d }, { "orderdate": "1994-08-22", "sum_price": 147071.86d } ] }
+, { "nation_key": 4, "sum_price": [ { "orderdate": "1993-09-20", "sum_price": 226806.66d }, { "orderdate": "1992-03-04", "sum_price": 219709.6d }, { "orderdate": "1996-01-06", "sum_price": 190490.78d } ] }
+, { "nation_key": 22, "sum_price": [ { "orderdate": "1998-02-27", "sum_price": 263411.29d }, { "orderdate": "1993-04-11", "sum_price": 221636.83d }, { "orderdate": "1993-05-07", "sum_price": 220715.14d } ] }
+, { "nation_key": 0, "sum_price": [ { "orderdate": "1997-01-13", "sum_price": 241837.88d }, { "orderdate": "1997-01-21", "sum_price": 240284.95d }, { "orderdate": "1997-08-24", "sum_price": 231831.35d } ] }
+, { "nation_key": 20, "sum_price": [ { "orderdate": "1993-01-31", "sum_price": 190960.69d }, { "orderdate": "1998-07-17", "sum_price": 187156.38d }, { "orderdate": "1993-03-25", "sum_price": 167017.39d } ] }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue785/query-issue785.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue785/query-issue785.1.adm
new file mode 100644
index 0000000..5808972
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue785/query-issue785.1.adm
@@ -0,0 +1,25 @@
+[ { "nation_key": 1, "sum_price": [ { "orderdate": "1993-05-26", "sum_price": 221036.31d }, { "orderdate": "1992-03-20", "sum_price": 216230.27000000002d }, { "orderdate": "1993-12-24", "sum_price": 211925.95d } ] }
+, { "nation_key": 2, "sum_price": [ { "orderdate": "1996-03-01", "sum_price": 218697.85d }, { "orderdate": "1996-08-13", "sum_price": 217709.03d }, { "orderdate": "1992-08-21", "sum_price": 207364.8d } ] }
+, { "nation_key": 8, "sum_price": [ { "orderdate": "1995-07-26", "sum_price": 244704.23d }, { "orderdate": "1994-12-03", "sum_price": 234763.73d }, { "orderdate": "1994-09-09", "sum_price": 228002.51d } ] }
+, { "nation_key": 9, "sum_price": [ { "orderdate": "1992-08-19", "sum_price": 240457.56d }, { "orderdate": "1995-03-02", "sum_price": 228136.49d }, { "orderdate": "1992-07-30", "sum_price": 226314.91d } ] }
+, { "nation_key": 10, "sum_price": [ { "orderdate": "1992-08-15", "sum_price": 232194.74d }, { "orderdate": "1997-01-03", "sum_price": 219920.62d }, { "orderdate": "1992-01-02", "sum_price": 210713.88d } ] }
+, { "nation_key": 13, "sum_price": [ { "orderdate": "1998-02-08", "sum_price": 223537.09d }, { "orderdate": "1993-11-24", "sum_price": 222392.53d }, { "orderdate": "1995-09-13", "sum_price": 197031.52d } ] }
+, { "nation_key": 18, "sum_price": [ { "orderdate": "1995-10-03", "sum_price": 245976.74d }, { "orderdate": "1992-06-03", "sum_price": 233161.66d }, { "orderdate": "1996-09-20", "sum_price": 219707.84d } ] }
+, { "nation_key": 19, "sum_price": [ { "orderdate": "1993-12-29", "sum_price": 328959.87d }, { "orderdate": "1997-08-04", "sum_price": 244636.7d }, { "orderdate": "1996-11-20", "sum_price": 222274.54d } ] }
+, { "nation_key": 21, "sum_price": [ { "orderdate": "1994-02-27", "sum_price": 198360.22d }, { "orderdate": "1992-07-07", "sum_price": 180692.9d }, { "orderdate": "1996-06-28", "sum_price": 139915.23d } ] }
+, { "nation_key": 3, "sum_price": [ { "orderdate": "1997-04-23", "sum_price": 351762.82999999996d }, { "orderdate": "1995-11-13", "sum_price": 242588.87d }, { "orderdate": "1993-07-15", "sum_price": 214494.39d } ] }
+, { "nation_key": 6, "sum_price": [ { "orderdate": "1992-05-28", "sum_price": 335178.33d }, { "orderdate": "1997-05-26", "sum_price": 216826.73d }, { "orderdate": "1996-04-30", "sum_price": 180054.29d } ] }
+, { "nation_key": 7, "sum_price": [ { "orderdate": "1995-03-19", "sum_price": 207925.83d }, { "orderdate": "1992-03-15", "sum_price": 206742.11d }, { "orderdate": "1992-05-10", "sum_price": 203904.8d } ] }
+, { "nation_key": 12, "sum_price": [ { "orderdate": "1995-05-01", "sum_price": 245388.06d }, { "orderdate": "1997-02-17", "sum_price": 225518.72d }, { "orderdate": "1996-08-20", "sum_price": 220636.82d } ] }
+, { "nation_key": 17, "sum_price": [ { "orderdate": "1997-07-05", "sum_price": 233874.09d }, { "orderdate": "1993-10-31", "sum_price": 224724.11d }, { "orderdate": "1996-04-18", "sum_price": 220727.97d } ] }
+, { "nation_key": 23, "sum_price": [ { "orderdate": "1993-06-08", "sum_price": 161307.05d }, { "orderdate": "1995-12-07", "sum_price": 153048.74d }, { "orderdate": "1994-08-22", "sum_price": 147071.86d } ] }
+, { "nation_key": 4, "sum_price": [ { "orderdate": "1993-09-20", "sum_price": 226806.66d }, { "orderdate": "1992-03-04", "sum_price": 219709.6d }, { "orderdate": "1996-01-06", "sum_price": 190490.78d } ] }
+, { "nation_key": 5, "sum_price": [ { "orderdate": "1997-04-04", "sum_price": 258779.02d }, { "orderdate": "1998-07-20", "sum_price": 209155.48d }, { "orderdate": "1994-04-27", "sum_price": 202917.72d } ] }
+, { "nation_key": 11, "sum_price": [ { "orderdate": "1994-12-15", "sum_price": 249900.42d }, { "orderdate": "1996-12-24", "sum_price": 237947.61d }, { "orderdate": "1992-12-01", "sum_price": 218116.21d } ] }
+, { "nation_key": 14, "sum_price": [ { "orderdate": "1993-12-27", "sum_price": 230949.45d }, { "orderdate": "1992-04-26", "sum_price": 134333.33d }, { "orderdate": "1997-03-09", "sum_price": 132838.49d } ] }
+, { "nation_key": 15, "sum_price": [ { "orderdate": "1998-05-31", "sum_price": 366291.52d }, { "orderdate": "1994-04-24", "sum_price": 228054.01d }, { "orderdate": "1993-01-29", "sum_price": 223995.46d } ] }
+, { "nation_key": 22, "sum_price": [ { "orderdate": "1998-02-27", "sum_price": 263411.29d }, { "orderdate": "1993-04-11", "sum_price": 221636.83d }, { "orderdate": "1993-05-07", "sum_price": 220715.14d } ] }
+, { "nation_key": 0, "sum_price": [ { "orderdate": "1997-01-13", "sum_price": 241837.88d }, { "orderdate": "1997-01-21", "sum_price": 240284.95d }, { "orderdate": "1997-08-24", "sum_price": 231831.35d } ] }
+, { "nation_key": 16, "sum_price": [ { "orderdate": "1994-09-20", "sum_price": 231012.22d }, { "orderdate": "1992-06-30", "sum_price": 221320.76d }, { "orderdate": "1993-05-14", "sum_price": 207291.83d } ] }
+, { "nation_key": 20, "sum_price": [ { "orderdate": "1993-01-31", "sum_price": 190960.69d }, { "orderdate": "1998-07-17", "sum_price": 187156.38d }, { "orderdate": "1993-03-25", "sum_price": 167017.39d } ] }
+ ]
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue786/query-issue786.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue786/query-issue786.1.adm
new file mode 100644
index 0000000..e3b97f5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/tpch-sql-like/query-issue786/query-issue786.1.adm
@@ -0,0 +1 @@
+[  ]
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 6494ac2..e31a375 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -2077,6 +2077,159 @@
         <output-dir compare="Text">ret-15</output-dir>
       </compilation-unit>
     </test-case>
+  </test-group>
+  <test-group name="tpch-sql-like">
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="query-issue638">
+        <output-dir compare="Text">query-issue638</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="query-issue785">
+        <output-dir compare="Text">query-issue785</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="query-issue785-2">
+        <output-dir compare="Text">query-issue785-2</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="query-issue786">
+        <output-dir compare="Text">query-issue786</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="query-issue601">
+        <output-dir compare="Text">query-issue601</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q10_returned_item">
+        <output-dir compare="Text">q10_returned_item</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q10_returned_item_int64">
+       <output-dir compare="Text">q10_returned_item_int64</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q11_important_stock">
+        <output-dir compare="Text">q11_important_stock</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q12_shipping">
+        <output-dir compare="Text">q12_shipping</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q13_customer_distribution">
+        <output-dir compare="Text">q13_customer_distribution</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q14_promotion_effect">
+        <output-dir compare="Text">q14_promotion_effect</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q15_top_supplier">
+        <output-dir compare="Text">q15_top_supplier</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q16_parts_supplier_relationship">
+        <output-dir compare="Text">q16_parts_supplier_relationship</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q17_small_quantity_order_revenue">
+        <output-dir compare="Text">q17_small_quantity_order_revenue</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q17_large_gby_variant">
+        <output-dir compare="Text">q17_large_gby_variant</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q18_large_volume_customer">
+        <output-dir compare="Text">q18_large_volume_customer</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q19_discounted_revenue">
+        <output-dir compare="Text">q19_discounted_revenue</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q01_pricing_summary_report_nt">
+        <output-dir compare="Text">q01_pricing_summary_report_nt</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q20_potential_part_promotion">
+        <output-dir compare="Text">q20_potential_part_promotion</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q21_suppliers_who_kept_orders_waiting">
+        <output-dir compare="Text">q21_suppliers_who_kept_orders_waiting</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q22_global_sales_opportunity">
+        <output-dir compare="Text">q22_global_sales_opportunity</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q02_minimum_cost_supplier">
+        <output-dir compare="Text">q02_minimum_cost_supplier</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q03_shipping_priority_nt">
+        <output-dir compare="Text">q03_shipping_priority_nt</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q04_order_priority">
+        <output-dir compare="Text">q04_order_priority</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q05_local_supplier_volume">
+        <output-dir compare="Text">q05_local_supplier_volume</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q06_forecast_revenue_change">
+        <output-dir compare="Text">q06_forecast_revenue_change</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q07_volume_shipping">
+        <output-dir compare="Text">q07_volume_shipping</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q08_national_market_share">
+        <output-dir compare="Text">q08_national_market_share</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="tpch-sql-like">
+      <compilation-unit name="q09_product_type_profit_nt">
+        <output-dir compare="Text">q09_product_type_profit_nt</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="writers">
+    <test-case FilePath="writers">
+      <compilation-unit name="print_01">
+        <output-dir compare="Text">print_01</output-dir>
+    </test-case>
     <test-case FilePath="flwor">
       <compilation-unit name="ret-16">
         <output-dir compare="Text">ret-16</output-dir>