Skip to content

Database engine that supports queries such as aggregation, join, view

Notifications You must be signed in to change notification settings

jaiminbhatt7/DatabaseEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DatabaseEngine

Database engine that supports queries such as aggregation, join, view Bechmarked on TPC-H 1G

Sample Queries

(q1)

SELECT SUM (ps.ps_supplycost), s.suppkey
FROM part AS p, supplier AS s, partsupp AS ps
WHERE (p.p_partkey = ps.ps_partkey) AND
	  (s.s_suppkey = ps.ps_suppkey) AND (s.s_acctbal > 2500)
GROUP BY s.s_suppkey

(q2)

SELECT SUM (c.c_acctbal),name
FROM customer AS c, orders AS o
WHERE (c.c_custkey = o.o_custkey) AND (o.o_totalprice < 10000)
GROUP BY c.c_name

(q3)

SELECT l.l_orderkey, l.l_partkey, l.l_suppkey
FROM lineitem AS l
WHERE (l.l_returnflag = 'R') AND
      (l.l_discount < 0.04 OR l.l_shipmode = 'MAIL')

(q4)

SELECT DISTINCT c1.c_name, c1.c_address, c1.c_acctbal
FROM customer AS c1, customer AS c2
WHERE (c1.c_nationkey = c2.c_nationkey) AND
	  (c1.c_name ='Customer#000070919')

(q5)

SELECT SUM(l.l_discount)
FROM customer AS c, orders AS o, lineitem AS l
WHERE (c.c_custkey = o.o_custkey) AND
      (o.o_orderkey = l.l_orderkey) AND
      (c.c_name = 'Customer#000070919') AND
	  (l.l_quantity > 30) AND (l.l_discount < 0.03)


(q6)

SELECT l.l_orderkey
FROM lineitem AS l
WHERE (l.l_quantity > 30)


(q7)

SELECT DISTINCT c.c_name
FROM lineitem AS l, orders AS o, customer AS c, nation AS n, region AS r
WHERE (l.l_orderkey = o.o_orderkey) AND
      (o.o_custkey = c.c_custkey) AND
	  (c.c_nationkey = n.n_nationkey) AND
	  (n.n_regionkey = r.r_regionkey)


(q8)

SELECT l.l_discount
FROM lineitem AS l, orders AS o, customer AS c, nation AS n, region AS r
WHERE (l.l_orderkey = o.o_orderkey) AND
	  (o.o_custkey = c.c_custkey) AND
	  (c.c_nationkey = n.n_nationkey) AND
	  (n.n_regionkey = r.r_regionkey) AND
	  (r.r_regionkey = 1) AND (o.orderkey < 10000)


(q9)

SELECT SUM (l.l_discount)
FROM customer AS c, orders AS o, lineitem AS l
WHERE (c.c_custkey = o.o_custkey) AND (o.o_orderkey = l.l_orderkey) AND
	  (c.c_name = 'Customer#000070919') AND (l.l_quantity > 30) AND
	  (l.l_discount < 0.03)


(q10)

SELECT SUM (l.l_extendedprice * l.l_discount)
FROM lineitem AS l
WHERE (l.l_discount<0.07) AND (l.l_quantity < 24)

About

Database engine that supports queries such as aggregation, join, view

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published