Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the question is return c_name where theres more than one order and 0_clerk = 'something' select c_name from customer inner join orders on


the question is return c_name where theres more than one order and 0_clerk = 'something' 

 

 

select c_name from customer inner join orders on c_custkey = o_custkey
where 

 

i got stuck here

imageimage

CREATE TABLE CUSTOMER( C_CUSTKEY C_NAME C_ADDRESS C_NATIONKEY C_PHONE C_ACCTBAL C_MKTSEGMENT C_COMMENT C_TOTORDERS CREATE TABLE ORDERS( O_ORDERKEY O_CUSTKEY O_ORDERSTATUS O_TOTALPRICE O_ORDERDATE O_ORDERPRIORITY NUMBER(12) VARCHAR(25) VARCHAR(40) NUMBER(12) CHAR(15) NUMBER(12,2) NOT NULL, CHAR(10) NOT NULL, VARCHAR(117) NOT NULL, NUMBER(5), CONSTRAINT CUSTOMER_PKEY PRIMARY KEY(C_CUSTKEY), CONSTRAINT CUSTOMER_CHECK1 CHECK(C_CUSTKEY >= 0)); O_CLERK O_SHIPPRIORITY O_COMMENT L_LINENUMBER L_QUANTITY L_EXTENDEDPRICE L_DISCOUNT L_TAX L_COMMENT NUMBER(12) NUMBER(12) CHAR(1) NUMBER(12,2) NUMBER(12) VARCHAR(79) NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NUMBER(12) NUMBER(12) NUMBER(12) NUMBER(12) DATE NOT NULL, CHAR(15) NOT NULL, CHAR(15) NOT NULL, NUMBER(12,2) NUMBER(12,2) NUMBER(12,2) NUMBER(12,2) VARCHAR(44) NOT NULL, NOT NULL, NOT NULL, NOT NULL, CONSTRAINT ORDERS_PKEY PRIMARY KEY (O_ORDERKEY), CONSTRAINT ORDERS_FKEY1 FOREIGN KEY (O_CUSTKEY) REFERENCES CUSTOMER(C_CUSTKEY), CONSTRAINT ORDER_CHECK1 CHECK(O_TOTALPRICE >= 0)); CREATE TABLE LINEITEM( L_ORDERKEY L_PARTKEY L_SUPPKEY NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, NOT NULL, CONSTRAINT LINEITEM_PKEY PRIMARY KEY (L_ORDERKEY, L_LINENUMBER), CONSTRAINT LINEITEM_FKEY1 FOREIGN KEY (L_ORDERKEY) REFERENCES ORDERS(O_ORDERKEY), CONSTRAINT LINEITEM_CHECK1 CHECK (L_QUANTITY >= 0), CONSTRAINT LINEITEM_CHECK2 CHECK (L_EXTENDEDPRICE >= 0), CONSTRAINT LINEITEM_CHECK3 CHECK (L_TAX >= 0), CONSTRAINT LINEITEM_CHECK4 CHECK (L_DISCOUNT BETWEEN 0.00 AND 1.00));

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Databases questions

Question

How do childhood experiences affect self-esteem?

Answered: 1 week ago