4. b. C. Create the following queries: List the names of places from which the company sells. Show all columns in the table. Name this query Q1-SELLING-LOCATIONS. a. What is the total sales by location for May 2008, sorted in descending order? Name this query Q2-SALES-MAY2008. (Hint: "Where" clause may be useful) The company has been informed that the tax has been increased to 17.5%. Calculate how much additional tax (i.e. the difference) would have been collected by the store by year. Name this query Q3 - ADDED-TAX.
Q: In what situations is it necessary to add a GROUP BY clause in a query?
A: Group By clause is used when we have to group the data into groups. It is used when we want to…
Q: LIST THE FIRST AND LAST NAMES OF ALL OWNERS WHO OWN A TWO-BEDROOM PROPERTY. USE THE IN OPERATOR IN…
A: Considering there are 2 tables:- OWNER: which holds the OWNER_NUM, FIRST_NAME, and LAST_NAME…
Q: What did each card cost? Show the card number, player last name, team name, price, price with 5%…
A:
Q: For each order, list the order ID, customer ID, order date, and most recent date among all orders.…
A: Given data For each order, list the order ID, customer ID, order date, and most recent date among…
Q: Write a query to list the book number, title, and number of times each book has been checked out…
A: Query The query for viewing book number, title and the number of times each book had been checked…
Q: Use SQL and TAL Distributors database to complete the following questions: List the item number and…
A: List the item number and description for all items. The descriptions should appear in uppercase…
Q: --List all products whose unit price is less than the average price. --List the shipper id,…
A: Given: consider the tables as. product { productID, productNAME, price_per_unit, category_product }…
Q: List every column in the Condo_UNIT table and its associated typ
A: The, database is a used to stores the data.
Q: Question 6 (Must include subquery): Write, a query that returns every customer that has a loan at…
A: The query is given below with output screenshot Demo data has been used in tables
Q: t the title of all books in the same category as books previously purchased by customer 1007. Don’t…
A: Lets see the solution.
Q: Write the SQL code that counts the number of assignments ordered for each project. Call this…
A: We have four tables namely: JOB PROJECT EMPLOYEE ASSIGNMENT We wish to write a query that counts…
Q: Write a query to produce the total number of hours round to 1 digit and charges round to 2 digits…
A: The Sql Query corresponding to the above problem is solved as : SELECT Proj_Num,…
Q: . Which manufacturers are located in the city of New York? Show the manufacturer's name, state,…
A: First, three parts will be answered. SQL query: 1) In this query, the SELECT statement along with…
Q: Write a query to display the first name, last name, and email address of employees hired from May 1,…
A: Here we have to write 2 queries whose details are as follows:Write a query to display the first…
Q: Write a query to display the book number, title and cost of books that have the lowest cost of any…
A: Query: In general, the term query describes a question or request that is made by a user or another…
Q: FROM SALESPERSON WHERE SPNUM= (SELECT SPNUM FROM CUSTOMER WHERE CUSTNUM=772): What is this subquery…
A: Given subquery SELECT SPNUM FROM CUSTOMER WHERE CUSTNUM=772
Q: Write the following as the MySQL query: List the employee ID, first name, last name, hire date,…
A: In database administration, it is frequently essential to extract particular data from a dataset…
Q: 4. Which customers live in Georgia or New Jersey? Put the results in ascending order by last name.…
A: Assume that, the name of the table is Customer The entities of Customer table are last name, first…
Q: Create a query that SELECT all of the EMPLOYEES from the EMPLOYEE TABLE that are Mangers. Include…
A: Self Join: A self join occurs when a table is linked to itself (also known as Unary…
Q: 1) Display the Name of the Product and the corresponding name of the supplier of that Product.…
A: Structured Query Language (SQL) allows use of JOIN operation to obtain information from two or more…
Q: Write query "List the title and ISBN of all books using the BOOKS table"
A: Query to display all the records of the books table: SELECT ISBN, BOOK_TITLE FROM BOOKS;
Q: Change to use the database frozenfood Alter table customerOrder add column total as data type…
A: Note: As per our guidelines we can able to solve only three questions. So, please re-post the…
Q: Write a query to display the rental number, rental date, movie title, and detail fee for each movie…
A: According to the given schema, first create a table Movies and insert some records in the table.…
Q: Part II: Complete the following exercise: Using a subquery, select student first name where the…
A: As per our guidelines, we are supposed to answer only 1st three parts. Kindly repost the remaining…
Q: 2. Determine which orders haven’t yet shipped and the name of the customer who placed the order.…
A: According to the information given:- We have to follow the instruction in order to perform the…
Q: 7. List all customers who were referred to the bookstore by another customer. List each customer’s…
A: The answer to the question is given below:
Q: Answer the query using SQL. For each department that controls more than 3 projects, retrieve the…
A: Introduction of DBMS: A database is a collection of data that are used to produce useful information…
Q: Write a query to display the manager name, department name, department phone number, employee name,…
A: SELECT MANAGER, D.DEP_NAME, D.DEP_PHONE, CONCAT (E.EMP_FNAME,'',E.EMP_LNAME) AS EMPNAME,…
Q: Please help and clearly explain step by step using access Create the following queries using the…
A: Q1-SELLING-LOCATIONS:Open "Query Design" from the "Create" tab.Add the table with selling…
Q: Use SQL commands. Include both SQL commands and results in your answers. Include screenshots of the…
A: Join: A JOIN clause is used to combine rows from two or more tables, based on a related column…
Step by step
Solved in 4 steps
- Write a query to list the author last name, author first name and the book title and cost for each book written by the author “Xia Chiang”. Sort the result by the book title and then the costdescendingQ. Please write SQL codes to query data from member tables based on below criteria Please write a SELECT statement to display each member’sdata that member_id is an odd number. Please display the result in ascending order of the last_name. The result should be identical to below results: [Screenshot]5. Determine the profit of each book sold to Jake Lucas, using the actual price the customerpaid (not the book’s regular retail price). Sort the results by order date. If more than onebook was ordered, sort the results by profit amount in descending order. Perform thesearch using the customer name, not the customer number.
- ERD:- PK CHECKOUT Check Num FK1 Book_Num FK2 Pat_ID Check Out Date Check_Due Date Check_In_Date PK BOOK Book Num Book Title Book_Year Book_Cost Book_Subject FK1 Pat_ID -H- PATRON PK Pat ID Pat_FName Pat_LName Pat_Type WRITES PK,FK1 Book Num PK,FK2 Au ID AUTHOR PK AU ID Au_FName Au_LName Au_BirthYearWrite a query to list the book title, checkout date, checkout due date and checkout in date for each book.List the names of all Staff members who hold a faculty position and have a salary of $45,000 or less. Show their names as their first name, followed by a space, and then their last name but sort the list alphabetically by last name and then first name. Hint: Check out the Position column in the Staff table. All staff members who do not hold a faculty position will get a bonus this year equal to 5% of their salary. List the names, current salary, and bonus amount for each Staff member (non-faculty) who is due a bonus. Show your list in order with the person receiving the highest bonus first.
- From the following query, identify the value of City: INSERT INTO Customers ( CustomerName, ContactName, Address, City, PostalCode, Country) VALUES (‘Cardinal,”Tom B. Erichsen”,”Skagen 21”, “Stavanger,” “4006Norway’);Write an SQL query using the UPDDATE and SET operator that willoverwrite all values containing 16 with 32 in the SupplierID attribute inthe Products table.Please help: Using the following sql file, how would you find List all the rows in which the prescription dates occur on or after November 14. How many doctors provide prescriptions with 30 tablets in total? List doctor’s details where speciality is either Dermatology or Neurology. (Use INoperator). List the results by the first name in ascending order and the last name indescending order Find all patients rows whose first names include ‘George’ (Assume case sensitivity). List number of patients that do not have a phone number. Beginfor c in (select table_name from user_tables) loopexecute immediate ('drop table '||c.table_name||' cascade constraints');end loop;End; //* Assignment_1 */ ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';CREATE TABLE DOCTOR (DOC_ID varchar2(5) PRIMARY KEY,DOC_LNAME varchar2(15),DOC_FNAME varchar2(15),DOC_INITIAL varchar2(1),DOC_SPECIALTY varchar2(15));INSERT INTO DOCTOR…
- 4) Display the firstname, lastname of the employees and the customerID that the employee served. Arrange the results by the last name. 5) Write a query to the Name of the Product and the corresponding name of the supplier of that Product for all the products that start with a “P”. 6) Write a SQL query to output the product name and the quantity of the Orders of that product for those orders with more than 70 quantity. (hint: don’t have to use GROUP BY) I need help figuring out the SQL quereys for the questions above using table joining methodWrite a query to determine how many products you can find in the Production.Product table. This is an SQL Table.If a subquery is used in the FROM clause of a query, how are the subquery’s results referenced in other clauses of the query?