This code must be in SQL -
Run the script provided with the assignment. This will create the tables used for this assignment. Write the necessary SQL commands to perform the required actions. Run the queries to obtain results from the database. (Make sure all columns returned have proper headings.)
|
3 |
|
2 |
|
2 |
|
3 |
|
3 |
|
4 |
|
4 |
|
4 |
Example:
ACI 41002 is one of the products you should display because…
Price per unit is $0.76, 20 times that value is $15.20
The sum of all orders containing ACI 41002 is $48.64, which is
larger than $15.20!
|
5 |
Since you have not provided the table schema and column names, it is impossible for me to provide you correct working SQL Queries.
For time being, I am guessing the table and column names and providing you the queries. Hence, you might need to change the names accordingly in order to make them wrong. In case you need any help, reach out to me via comments section.
1. SELECT count(DISTINCT manufacturer), max(unitPrice), min(unitPrice) FROM Products;
2. SELECT avg(sales) FROM SalesRep WHERE work_location = 'Home';
3. SELECT CustNum, sum (amount) FROM Customer c JOIN Orders o ON c.CustNum = o.CustNum GROUP BY o.CustNum;
NOTE: As per Chegg policy, I am allowed to answer only 3 questions (including sub-parts) on a single post. Kindly post the remaining questions separately and I will try to answer them. Sorry for the inconvenience caused.
This code must be in SQL - Run the script provided with the assignment. This will...
If possible please just send the SQL statement. Thank you
Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...
Using the below Relational Design from Oracle SQL data modeler,
provide sql script for the following queries (note please be sure
to include "PART3.Table_name" when pulling info from specific
tables)
Query 6: How many orders are there by customer and what is the
total sales and total profit sorted by customer’s total number of
orders?
Query 15: What is the total number of orders by shipping
class?
Query16: What are the monthly total sales from 2013 to 2014?
Query 17:...
I can provide my log in to my teradata database if
necessary.
Thanks
19:31 P B . Ch. 6 HW Assignment 4 - Saved SG 59% Make db_pvfc11_big as your default database when you log into SQL Assistant: Username userid Password: Default Database: db pufc11_big Database Descriptions Provide proof of ownership by using Current_User attribute in all SELECT statements. Use the PVFC database to answer the following questions: 1. For each customer, list the CustomerID and the total number of...
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:...
using SQL Assume the relations shown below (underlined attributes are primary and foreign keys): merchants(mid, name, city, state) products(pid, name, category, description) sell(mid, pid, price, quantity_available) orders(oid, shipping_method, shipping_cost) contain(oid,pid) customers(cid, fullname, city, state) place(cid, oid, order_date) For each of the following questions write a SQL query: List names and sellers of products that are no longer available (quantity=0) List names and descriptions of products that are not sold. How many customers bought SATA drives but not any routers between 2009...
--* BUSIT 103 Assignment #3 DUE DATE : Consult course calendar /* You are to develop SQL statements for each task listed. You should type your SQL statements under each task. You should always create an alias for any derived fields. Add a sort that makes sense for each query. */ USE AdventureWorksLT2012; --1. Build a single column of data in which...
MYSQL Applied Database I just want to make sure that the syntax looks okay for my database SQL statements, any help would be much appreciated: 1.A query that asks for customer star review for Tony Stark on Opportunity Detail. SELECT CONCAT (employee_first_name,' ',employee_last_name) AS employee_name, review_star_count, FROM customer_reviews, JOIN e employees ON employee_id =employee_id, WHERE employee_id=4 AND opportunity_id=1; 2.A query that shows how many orders Additional Dot Twain License, in an order totaling over $900. SELECT product_name, COUNT(o.OrderID) AS...
Write an SQL query against the Chinook Database v1.4. Each query
must run successfully using DB Browser for SQLite. Create the exact
query below. Must use sub query. I saw that a
similar solution for this question used IF and CONCAT functions
which do not work and return errors. If it is possible to use the
CASE function in place of IF that would be greatly appreciated.
Also I really hate to ask but if it could be organized neatly...
* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...
Use SQL to slove the problem
1. (7) List all condos in building C, the date they were
cleaned, and the full name of the staff who cleaned them in
August.
2. (5) Display the activities reserved in June for more than 3
people. Include the activity description and label the output as
Activities Reserved in June.
3. (4) Listing for all guides and their certification renewal
dates for next year. Include full name and hire date.
4. (6) Management...