8) Develop an SQL query to determine which holiday had the most sales and then drill down via another query to determine for that holiday which dealership had the most sales. Then drill down by another query to determine for that holiday which dealership, by zip code, and make had the most sales.
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
SELECT SALE_DAY
FROM TIME
WHERE SALE_DAY IN (SELECT SALE_DAY
FROM ( SELECT T.SALE_DAY,
RANK () OVER ( ORDER BY SUM (SF.GROSS_SALES_AMOUNT) DESC) DAY_RANK
FROM TIME T, SALES_FACTS SF
WHERE T.SALE_DAY = SF.SALE_DAY
AND DAY_TYPE = 'HOLIDAY'
GROUP BY T.SALE_DAY)
WHERE DAY_RANK = 1);
Kindly revert for any queries
Thanks.
8) Develop an SQL query to determine which holiday had the most sales and then drill...
Oracle 12c: SQL Joan Casteel ISBN: 978-1-305-25103-8 Chapter 12 Case Study: City Jail Make sure you have run the CityJail_8.sql script from Chapter 8. This script makes all database objects available for completing this case study. The city's Crime Analysis unit has submitted the following data requests. Provide the SQL statements using subqueries to satisfy the requests. Test the statements and show execution results. Use a sql sub-query statement to answer the following: (Please provide correct answer for questions 6...
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...
Query #4 Please
"Which street in the suburb Camperdown has the highest average
rent"
in LISTING, the "type" column determines if it is "rent" or
"sell"
Thankyou
Views PROPERTY [pid, stno, stname, sttype, suburb, state, postcode, carspaces] Write the following queries in SQL in your PROPERTY database: SHAREDPROPERTY unitno,pid, proptype] AGENCY [agencylicence, agencyname, website, phone] 1. List all townhouses sold in the suburb Annandale in 2016 2. Find the suburbs that have not had any sales since 2017 BRANCH agencv,...
Write an SQL query to list those properties that have never been
sold.
Design Tip
When a property has sold, its information can be found in
Sales table and vice versa.
List each property with the following four columns: property_id,
primary_purpose, locality, and the area.
Name the area coulmn as "Area". (Since the dataset might be
incomplete, return "N/A" when the area is unknown for a
property.)
So the problem I got is that I got very similar output
as...
a.From the table below, Use sql query to give the total cost of each Ice cream flavor b. give the count of customers that like exactly two flavors CUSTOMER (Cust_ID, Cust_name, year_born) They want to link CUSTOMER to their database. Customer flavor preference is shown in table 2. Following tables are from assignment 1 ICECREAM (Ice_cream_ID, Ice_cream_flavor, price, years_first_offered, sellling _status) INGREDIENT( Ingredient_ID, Ingredient_name, cost) RECIPE (Ice_cream_ID, ingredient_ID, quantity_used) WHERE: Ice_cream_ID is the internal Id given to an ice cream....
You will develop an E-Commerce database used to maintain
customers, products and sales information. You are required to 1)
gather and analyze requirements 2) design logical structure of the
database 3) create stored procedures to develop the tables and
insert the data 4) write SQL statements for data extraction and
reporting.
Throughout the course of this semester you have analyzed the
requirements for an eCommerce database, designed and developed your
database. As a class we have gone through the process...
Top of Form Q1 Which of the following is a valid aggregate function in SQL? Check only those that apply. Question 1 options: AVG LEAST COUNT MIN MOST SUM Q2 Which of the following aggregate functions will only operate on a numeric value expression? Check only those that apply: Question 2 options: MIN MAX AVG COUNT SUM Q3 When applying DISTINCT to the value being calculated in an aggregate function like COUNT, what is the effect? SELECT COUNT(DISTINCT StreetName) FROM...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...
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...
You are hired by a sales company to research which advertising techniques are most effective in selling cars. In El Cajon they are using radio ads, in Mira Mesa they are using posters, in Chula Vista they are using TV ads, and in Mission Beach they are using Facebook. Conduct a one-way ANOVA to determine if there are significant differences in the mean number of cars sold using the different ad techniques. Radio Posters TV Facebook 3 5 8 8...