PLease answer in SQL PLUS
vendor (vid, vendorname, address)
mis (fedid, stateid, name, address)
storerequest (requestno, storeno, date)
vendorcatalog (vid, itemno)
storerequestItem (requestno, itemno, quantity)
inventory (itemno, location, quantity)
inventorydes (itemno, itemdescription, unitcost)
store (storeno, name, address, fedid, description)
List the every store number and request number of the request amount is over $1,000
Solution can be achieved by doing joins over tables. Below is query.
Select s.storeno,s.requestno from storerequest s inner join. Storequestitem si on s.requestno=si.requestno inner join inventorydes id on si.itemno=I'd.itemno group by s.storeno,s.requestni having sum(si.qunatity)*sum(id.unitcost )> 1000;
In where condition we did multiplication of 2 columns quantity and unit cost to get total cost.
PLease answer in SQL PLUS vendor (vid, vendorname, address) mis (fedid, stateid, name, address) storerequest (requestno,...
PLease answer the question in SQL plus: vendor (vid, vendorname, address) mis (fedid, stateid, name, address) storerequest (requestno, storeno, date) vendorcatalog (vid, itemno) storerequestItem (requestno, itemno, quantity) inventory (itemno, location, quantity) inventorydes (itemno, itemdescription, unitcost) store (storeno, name, address, fedid, description) List the store number and store name that has not put in an order during January 2019.
Consider the following relations. Product: (Product#, p-description, p-indate, p-price) Vendor: (V-code, v-name, v-address) Purchase: (Product#, V-code, date) Write an SQL query to list the prices of the products that were purchased on 9 December 2019
SQL
I have a database
CREATE TABLE vendor
( vid CHAR(2) NOT NULL,
vname VARCHAR(25) NOT NULL,
PRIMARY KEY (vid) );
CREATE TABLE category
( catid CHAR(2) NOT NULL,
catname VARCHAR(25) NOT NULL,
PRIMARY KEY (catid) );
CREATE TABLE product
( pid CHAR(3) NOT NULL,
pname VARCHAR(25) NOT NULL,
price NUMERIC (7,2) NOT NULL,
vid CHAR(2) NOT NULL,
categoryid CHAR(2) NOT NULL,
PRIMARY KEY (pid));
CREATE TABLE region
( rid CHAR NOT NULL,
rname VARCHAR(25) NOT NULL,
PRIMARY KEY (rid)...
For our Expenditure (Purchases-Payments) cycle, we want to store the following data about our purchases of inventory: item number date of purchase vendor number vendor address vendor name purchase price quantity purchased employee number employee name purchase order number description quantity on hand extended amount total amount of purchase a. Semantically create a conceptual design (entity-relationship diagram) with max cardinalities. b. Design a set of properly normalized relational tables to store the data, using the following format: Table Name Primary...
NEED THE SQL QUERIES ASAP PLEASE(LIKE 1 HOUR) THE ONES WITH ID ARE PRIMARY KEYS OR FOREIGN etc Customer [ CustID, LastName, FirstName, Address, City, State, Zip, Phone, Fax, Email] Product [ ProdID, Description, Color, Size, Pack] Sales [ TransID, CustID, ProdID, Price, Quantity, Amount] Write SQL statement to produce a list of unique products and their prices from the Sales table. Please ensure that the products do not repeat. Write an SQL statement to list ProdID and Description for...
CUSTTYPE (TID, TypeDesc) CUSTOMER (CID, Lname, Fname, TID, Address, ZIPcode) CUSTORDER (OrderNo, OrderDate, PromiseDate, ShippedDate, ShippingTerm, SalesID, CID) SALESREP (SalesID, Name, Phone, Address, ZIPcode, RepType) ORDERLINE (OrderNo, PID, Qty, Qty_RETD) FTSALESREP (SalesID, MonthPay, Rank) PTSALESREP (SalesID, HourlyRate, WeekHours) ZIP_TABLE (ZIPcode, City, State) VENDOR (VID, Name, Phone ZIPcode) PRODUCT (PID, CateID, ProdName, ProdFinish, Price, Qty_on_Hand, Description, VID) CATEGORY (CateID, CateType) Local View #1: Use three base tables to develop a SQL statement that will list the following information for a customer,...
Given the following relational schema, write queries in SQL to answer the English questions. The Access Database for the schema is available, as is a DDL file. It is also available on the MySQL server. You must only submit the SQL for your answers. You can get your answers without using a DBMS or by using Access or MySQL. Customer(cid: integer, cname: string, address: string, city: string, state: string) Product(pid: integer, pname: string, price: currency, inventory: integer) Shipment(sid: integer, cid:...
SQL: Write a query to, by store (number), list the maximum
number of store visits made by a customer.
Date_Dimension Date_Key Date Description Day OF Week Day Description Weekday Flag Day OF Month Day OF_Year Month _Descrip... Month Of Year Quarter Descr... v Time_Dimensi... Item_Dimension (dbo. Time_Key ?Item_Key Time Description AM PM Item Number Category_Number Sub_Category_Number Primary_Description Secondary_Description Color Description Size_Description Item Status Code Fineline Item_Scan_ Fact (dbo.Item... Visit Number Store_Key Item Key Member_Key Transaction_Type Key Transaction_Date Key Transaction Store...
List all items sold by the company, sorted alphabetically by category and the alphabetically by item name. please give me an sql query for this question and i have tables as follows customer(customer_name,address,zipcode,customer_id,state),office_supplies(item_name,item_id,cost,category),orders(order_id,date,customer_id) order_details(quantity,order_id,item_id)
can someone solve these quick
please and thank you!
sql chapter 4
Query #1: List the company name, contact name, contact title and
the phone number for customers who HAVE NOT put in an order. Use an
outer join.
Query #2: Create a listing displaying the employee first name,
last name and the full name (First name space Last Name) of the
person they report to (Supervisor). This is a self-join. If an
employee does not report to anyone then...