1. Display the average standard_price of all products in product_T that are of ProductFinish Cherry 2. Display the ProductID of all orders that had more than 5 items 3. Display the Product Description of all orders that had more than 10 Items 4. Display the customer name and telephone of all customers living in either Grant, Evergreen 5. display the number of salesperson for each TerritoryID (Tips: group by) 6. Use equi join with DoesBusinessIn_T and customer_T to display: the name and city of customer in Territory 'SouthEast' 7. Use subquery with DoesBusinessIn_T and customer_T to display: the name and city of customer in Territory 'SouthEast' 8. Use Inner join to ffflist the names of all the courses that 'Letersky' took in the past. 9. Display the number of students registered for course 'database'. 10 list all the students not registered for section 2714. 11. How many patients does physician 'Hematology' care for? 12. show the number of employees for each care center (Tips: group by).
Added by Nicolas P.
Close
Step 1
To display the average standard_price of all products in product_T that are of ProductFinish Cherry, you can use the following SQL query: SELECT AVG(standard_price) AS average_price FROM product_T WHERE ProductFinish = 'Cherry'; Show moreā¦
Show all steps
Your feedback will help us improve your experience
Lottie Adams and 58 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Akash M.
Please help me with these SQL queries 1. Give a list of customers (IDs and names) who have purchased multiple items, but all of which were the same color. Multiple items means more than one sale item. Use what you learned in the previous problem about counting colors. 2. Give a list of products and their list prices for sneakers whose list price is less than the average for flats. Only show product names and prices. 3. What is the most expensive sale item (SalePrice * Quantity) ever made and to whom was it made (first and last name)? Name the column LargestItemSale. (Use a max subquery in the WHERE clause.) Manufacturer: - ManufacturerID - ManufacturerName - Address1 - Address2 - City - State - PostalCode - Country - Phone - Fax - Contact - URL Customer: - CustomerID - FirstName - LastName - StreetAddress - City - State - PostalCode - Country - Phone Product: - ManufacturerID - ProductID - ProductName - Composition - ListPrice - PostalCode - Gender - Category - Color - Description - Phone - Fax - Contact - URL SaleItem: - SaleID - ProductID - ItemSize - SaleID - Quantity - SalePrice InventoryItem: - ProductID - ItemSize - QtyOnHand PurchaseItem: - ProductID - ItemSize - PurchaseID - Quantity - PurchasePrice Sale: - SaleID - SaleDate - CustomerID Purchase: - PurchaseID - PurchaseDate - EmployeeID - ExpectedDeliveryDate - ManufacturerID - Shipping Employee: - EmployeeID - FirstName - LastName - Address - City - State - ZIP - Phone - ManagerID - SSN - EmailAddress - HireDate Shipping: - ShippingID - EmployeeID - ShippingDate SalaryEmployee: - EmployeeID - Salary WageEmployee: - EmployeeID - Wage - MaxHours
Using MySQL, write a query to List all customers who spent 25% or less than the average amount spent on all invoices. For each customer, display their name and the amount spent to 6 decimal places. Order the result by the amount spent from high to low.. There are two tables in the database: 1) customer 2) invoice Example: customer id | customer_name | city_id | customer_address | contact_person | email | phone 1 | Drogerie Wien | 1 | Deckergasse 15A | Emil Steinbach | emil@drogeriewien.com | 094234234 2 | Cosmetics Store | 4 | Watling Street 347 | Jeremy Corbyn | jeremy@c-store.org | 093923923 3 | Kosmetikstudio | 3 | Rothenbaumchaussee 53 | Willy Brandt | willy@kosmetikstudio.com | 0941562222 4 | Neue Kosmetik | 1 | Karlsplatz 2 | NULL | info@neuekosmetik.com | 094109253 5 | Bio Kosmetik | 2 | MotzstraĆe 23 | Clara Zetkin | clara@biokosmetik.org | 093825825 6 | K-Wien | 1 | KƤrntner StraĆe 204 | Maria Rauch-Kallat | maria@kwien.org | 093427002 7 | Natural Cosmetics | 4 | Clerkenwell Road 14B | Glenda Jackson | glena.j@natural-cosmetics.com | 093555123 8 | Kosmetik Plus | 2 | Unter den Linden 1 | Angela Merkel | angela@k-plus.com | 094727727 9 | New Line Cosmetics | 4 | Devonshire Street 92 | Oliver Cromwell | oliver@nlc.org | 093202404 invoice id | invoice_number | customer_id | user_account_id | total_price 1 | in_25181b07ba800c8d2fc967fe991807d9 | 7 | 4 | 1436 2 | 8fba0000fd456b27502b9f81e9d52481 | 9 | 2 | 1000 3 | 3b6638118246b6bcfd3dfcd9be487599 | 3 | 2 | 360 4 | dfe7f0a01a682196cac0120a9adbb550 | 5 | 2 | 1675 5 | 2a24cc2ad4440d698878a0a1a71f70fa | 6 | 2 | 9500 6 | cbd304872ca6257716bcab8fc43204d7 | 4 | 2 | 150 Expected Output 1 Kosmetikstudio 360.000000 2 Neue Kosmetik 150.000000
Madhur L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD