You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by dh...@apache.org on 2021/06/30 06:26:46 UTC

[arrow-datafusion] branch master updated: Add query 15 to queries (#645)

This is an automated email from the ASF dual-hosted git repository.

dheres pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/master by this push:
     new ae745d9  Add query 15 to queries (#645)
ae745d9 is described below

commit ae745d9a8b81678d767849b032067349944d12c9
Author: Daniƫl Heres <da...@gmail.com>
AuthorDate: Wed Jun 30 08:26:40 2021 +0200

    Add query 15 to queries (#645)
---
 benchmarks/queries/q15.sql | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/benchmarks/queries/q15.sql b/benchmarks/queries/q15.sql
new file mode 100644
index 0000000..b5cb49e
--- /dev/null
+++ b/benchmarks/queries/q15.sql
@@ -0,0 +1,34 @@
+create view revenue0 (supplier_no, total_revenue) as
+	select
+		l_suppkey,
+		sum(l_extendedprice * (1 - l_discount))
+	from
+		lineitem
+	where
+		l_shipdate >= date '1996-01-01'
+		and l_shipdate < date '1996-01-01' + interval '3' month
+	group by
+		l_suppkey;
+
+
+select
+	s_suppkey,
+	s_name,
+	s_address,
+	s_phone,
+	total_revenue
+from
+	supplier,
+	revenue0
+where
+	s_suppkey = supplier_no
+	and total_revenue = (
+		select
+			max(total_revenue)
+		from
+			revenue0
+	)
+order by
+	s_suppkey;
+
+drop view revenue0;
\ No newline at end of file