Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Follow the instructions and answer all the questions deliver original work I would like the contents of the .sql file along with the python script,



Follow the instructions and answer all the questions deliver original work

I would like the contents of the .sql file along with the python script, as per the instructions


This week, you learned about using database manipulation language (DML) to select records from the database. In this assignment, please use SQL Server Management Studio Express to write SQL statements to manipulate (query) the data that is present in the database.

The following are questions that need to be answered using structured query language:

  1. What is the total quantity sold for the top 5 products (based on sales)? Show only the product name, total quantity sold, and sales revenue amount in the result.
  2. What is the total amount of orders for each customer? Show only the customer name and the sales revenue total in the result.
  3. What is the total amount of orders associated with each product? Show only the product name and the sales revenue total in the result.
  4. What is the total count of orders per month by year? Show the month, year, and the count in the result.
  5. What is the total count of customers per state? Show the state (alphabetical) and the count in the result.

Part 1: SQL Script

1. Provide one SQL script that includes each set of SQL statements written to answer the questions above. SELECT, JOINS, and GROUP BY aggregate functions will be required.

2. Be sure to include comments in your code that succinctly describe the logic used and also the question being answered by that section of code.

Part 2: Paper

1. Describe each question being addressed, the tables involved, and the required steps for writing a query using SQL to address the question.

2. Provide annotated screenshots of the results of each query result by embedding each in the paper.


Please include screenshots & source code for high rating!! Thank you!!

Module 8 Assignment Part 1: AVL Rotations

Please solve below questions and I share given coding so give adjusted coding by using given coding at the end. Please correct the place where it says "Writeyour code" and send the coding.

  1. AVL.java
  2. AVLNode.java

AVL

In this two-part assignment, you will be coding anAVL, which is a special type of binary search tree. It must follow the same rules as binary search trees: each node has 0-2 children, all data in the node's left subtree is less than the parent node's data, all data in the node's right subtree is greater than the parent node's data, and every node's data is unique.

However, an AVL differs from a BST with its self-balancing rotations, which you will implement in part one of this two-part assignment.

IMPORTANT:

  • You will be given unlimited attempts on this assignment, with no cooldown between submissions.
  • Please run your code before each submission to ensure that there are no formatting errors! If there are formatting errors in your code, your code will not be graded and a submission attempt will be logged. For more information, please review the Vocareum overview below.

AVLNode

AnAVLNodeclass is provided to you and will be used to represent the nodes of the tree. This file should be treated asread-onlyand should not be modified in any way. This AVLNode class contains getter and setter methods to access and mutate the structure of the nodes. Please make sure that you understand how this class works, as interaction with this class is crucial for this assiggggnment.

Part 1 - Rotations

In the first part of this assignment, you will be implementing the rotation functionality of an AVL. There are four methods that work in conjunction to ensure that the AVL remains balanced at all times; each of which is outlined below. For this assiggggggnment, you will be implementing those four methods. Be sure to read the javadocs for more information!

updateHeightAndBF



imageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimageimage

Example: INSERT INTO table tool_jobs (tool_id, job_id) VALUES ((SELECT too_id FROM tools WHERE tool_name = 'Hammer' ), (SELECT job_id FROM jobs WHERE job_name = 'roofing')); Explanation: The SELECT id FROM tools WHERE tool_name = 'Hammer' will return value of PK from the tools table which corresponds to tool with name 'Hammer'. We insert it into tool_jobs table where tool_id is a FK that references table tools.

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

Lets go through each question SQL Script Question 1 Total quantity sold for the top 5 products based on sales SELECT TOP 5 ProductName SUMQuantity AS TotalQuantitySold SUMQuantity Price AS SalesRevenu... 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 Programming questions

Question

gpt 5 2 9 . .

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

State the uses of job description.

Answered: 1 week ago