Assume that for those materials the ID of which starts with a numeric character, the last three letters of the ID represent a wood type. Further, assume that the numeric part of MaterialID (everything except the last three characters) is called material type. For each material type, list the number of vendors who supply it and the average price at which is supplied.
Want to see the full answer?
Check out a sample textbook solutionChapter 5 Solutions
Pearson eText for Modern Database Management -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
Starting Out with C++: Early Objects
Modern Database Management (12th Edition)
- PATHS is a table that contains information about paths on a number line. The structure of PATHS is as follows, where x1 and x2 represent that there is a path from Coordinate x1 to Coordinate x2 (You can't move from Coordinate x2 to Coordinate x1 ). NAME ΤΥΡE NULLABLE X1 INT FALSE X2 INT FALSE Problem Please write an SQL statement that returns the beginning and end point of each path in PATHS . Sort them by the value of the beginning point in ascending order. Constraints • In the case where a direct path from Coordinate a to Coordinate b is available, no path from Coordinate b to Coordinate a will be given. |x1-x2| = 1 • No path will overlap with one another. Example Suppose that PATHS is as follows: x1 x2 1 2 2 3 4 7 7 6 This table can be visualized as follows: START END END START 7 8. 9 Therefore, your SQL statement must return the following: start end 1 4 8 6arrow_forwardDisplay all the student names whose grade is C. Display the Section-Identifier and Course-name whose Course-number is “MATH2410”. Display the Student Name and the Course Name in which he has got “A” grade.arrow_forwardThe same description as Problem I. You are asked to display order's item list and meal cost to customer. Each meal must have at least one main item, but side item and drink are optional. Also, a 10% coupon code is available to use. So the main items can be decorated by the side items, drink and coupon. This gives a customer flexibility to order any number of sides or drinks for a meal. Please note that each side item and drink can be multiple or partial. The cost of multiple or partial side and drink is adjusted proportionally, for example, cost of 2 orders of Coke is 2x$1.00, 40% order of Fries is 0.4x$1.5. However, coupon can be used only once per order. We would like to use the Decorator pattern and Singleton pattern to create the receipt to show order's item name, quantity, item unit price, item cost, any coupon applied and final cost. The singleton is to ensure that the coupon can be applied only once in an order. Here is price for each item Main items, Hamburger: $6.5;…arrow_forward
- Consider the following set of requirements for a university database that is used to keep track of students' of student enrollments in classes and students' final grades: a. The university is organized into colleges (COLLEGE), and each college has a unique name (CName), a main office (COffice) and phone (CPhone), and particular faculty member who is dean of the college. Each college administers a number of academic departments (DEPT). Each department has a unique name (RName), a unique code number (RCode), a main office (ROffice) and phone (RPhone), and a particular faculty member who chairs the department. We keep track of the start date (CStartDate) when that faculty member began chairing the department. b. A department offers a number of courses (COURSE), each of which has a unique course name (COName), a unique code number (CCode), a course level (Level: this can be coded as 1 for freshman level, 2 for sophomore, 3 for junior, 4 for senior, 5 for MS level, and 6 for PhD level), a…arrow_forwardA rail transport company wishes to hold details of train services, stations and operators. Details include the following: Trains: A train has a unique id code, a collection of days it runs on (Monday, Sunday etc.), and the number of carriages it has. Each train must have at least one driver but can have many drivers that can drive it, and a driver may drive many trains. Each driver is identified by an employee number and a name. A train is designated as either an InterCity or District train though other types of train are possible. Each train must have an operator and not more than one operator. Each operator has a name and a phone number. The operator can operate many trains (or none at all!) Stations: A station has a name and the number of platforms it has. All stations are classified as either Main or District only. There are no other types of stations. Timetable: A train has a number of stops at a station during its journey. It never visits the same station twice on the same…arrow_forwardr and l values question.arrow_forward
- Plot point please.arrow_forwardcalculate_new_balance Given a starting balance (a number), and a list of transaction tuples, calculate the final balance for an account. Transaction tuples are of the shape ("description", amount, "withdrawal") , or ("description", amount, "deposit"). The last entry in the tuple will be either "withdrawal" or "deposit". Every withdrawal decreases the balance of the account by the specified amount, and every deposit increases the balance. The return value is the new account balance, as a number. (which could be negative) Sample calls should look like: >>> calculate_new_balance(100, [("payday", 20, "deposit"), ("new shoes", 50, "withdrawal"), ("illicit winnings", 200, "deposit")])270>>> calculate_new_balance(100, [])100arrow_forwardAn Art Museum needs to keep track of its artwork and exhibitions. The museum has a collection of artwork. Each piece of art has a unique id [ArtID], an artist, year and title. Artwork is categorized by type. There are two types, paintings and sculptures. Paintings have a paintType and style. Sculptures have a material, height and weight. Artwork is frequently shown in exhibitions. Each exhibition has a unique name, startDate, endDate. A listing of the artwork displayed at an exhibition is also retained. Below is an E-R diagram for a database to help the Art Museum. Provide appropriate names for entities E1, E2, E3, E4 identifiers 11, 12, 13, 14 missing attributes and relationship cardinality RC1 and relationship type RT1. Start_date End_date E1 E1 11 RC1 PaintType Style E3 13 A1 Title Year A/ A A/ A/ A/ A/ A/ A/ A A/ A/ E2 12 A/ E2 E3 E4 11 12 13 14 A1 A2 RC1 RT1 RT1 A2 Height Weight E4 14 Activate Go to Settinarrow_forward
- Create a table of your courses for this semester with fictitious grades for Test 1, Test 2, and Test 3 with appropriate weighting. The next column should determine the grade using the 'if' function, with plus and minus. The grade cell should show a discrete color scheme with below C- in red; above B in green and, yellow for the rest. This should be done using conditional formatting of cells.arrow_forwardPlease help with the followng:arrow_forwardINSERT INTO Athletics VALUES((100, 'Samuel', 'David', '1967-11-17', '23',1967-11-20); INSERT INTO Athletics VALUES((110, 'Mario', 'Cassius', '1967-11-13', '22',1967-11-20 ); INSERT INTO Athletics VALUES((104, 'Mario', Ace', '1967-12-31', '26',1967-11-20 ); INSERT INTO Athletics VALUES((123, 'Cristisno', 'Ronny', '1965-11-13', '28',1967-11-20 ); INSERT INTO Athletics VALUES((110, 'Harx', 'Wale', '1964-11-12', '20',1967-11-20 ); QUESTION Create a stored procedure named sp_InsertAthleteDetails, which enters details into the Athletics table by using 4 parameters for the first four columns in the Athletics table. Set No Count on.arrow_forward
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage