Find names of all students who are enrolled in two classes

Assignment Help Database Management System
Reference no: EM13934305

Consider the following relations:

Student(snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets at: time, room: string, fid: integer)

Enrolled(snum: integer, cname: string)

Faculty(fid: integer, fname: string, deptid: integer)

The meaning of these relations is straightforward; for example, Enrolled has one record per student-class pair such that the student is enrolled in the class.

Write the following queries in SQL. No duplicates should be printed in any of the answers.

1. Find the names of all Juniors (Level = JR) who are enrolled in a class taught by

I. Teach.

2. Find the age of the oldest student who is either a History major or is enrolled in a course taught by I. Teach.

3. Find the names of all classes that either meet in room R128 or have five or more students enrolled.

4. Find the names of all students who are enrolled in two classes that meet at the same time.

5. Find the names of faculty members who teach in every room in which some class is taught.

6. Find the names of faculty members for whom the combined enrollment of the courses that they teach is less than five.

7. Print the Level and the average age of students for that Level, for each Level. 40

8. Print the Level and the average age of students for that Level, for all Levels except JR.

9. Find the names of students who are enrolled in the maximum number of classes.

10. Find the names of students who are not enrolled in any class.

11. For each age value that appears in Students, find the level value that appears most often. For example, if there are more FR level students aged 18 than SR, JR, or SO students aged 18, you should print the pair (18, FR).

Reference no: EM13934305

Questions Cloud

Meeting the customer requirements : Meeting the customer requirements (Oakland 2003) is a reasonable definition of quality. b. Customer satisfaction means we can wrap up our projects more rapidly (Frame 2002, quoted in Reid 2013a) c. Not doing it right the first time at every stage ..
What is the role of an i/o psychologist in an organization : How are I/O psychologists trained? What is the role of an I/O psychologist in an organization? How will the role of I/O psychologists change/evolve in the next several years?
Full assessment description-marking criteria : Before starting this assessment activity, read the full assessment description, marking criteria, submission requirements and guidance provided on the course textbook. Assessment Guidance Then check the assessment discussions on the forum(s) for a..
Use excel to set up an amortization schedule : A customer with a trade-in offers the store a $260 cash price for the cabinet. Is that a better deal (for the customer) than the store is offering? On Mary's 16th birthday, her parents invest on her behalf an amount of $5,000 into an account that ..
Find names of all students who are enrolled in two classes : Find the names of all students who are enrolled in two classes that meet at the same time. Find the names of faculty members who teach in every room in which some class is taught.
Determine the force exerted by the deltoid muscle : Determine the force exerted by the deltoid muscle on the upper arm at A and the x- and y-components of the force reaction at the shoulder joint O
Compare and contrast reversal treatment designs : Compare and contrast reversal treatment designs. What advantages or disadvantages exist for these two designs? Taking into consideration the strengths, limitations, and appropriateness of each design, which, in your supported opinion, is superior ..
Discuss the various logistical issues : Discuss the various logistical issues you would have to consider before commencing the import of products from the two new factories, taking into account the various procedures that need to be considered, the modes of transport you may need to use..
Find the aids of all aircraft that can be used on routes : Find the aids of all aircraft that can be used on routes from Los Angeles to Chicago. Identify the routes that can be piloted by every pilot who makes more than $100,000.

Reviews

Write a Review

Database Management System Questions & Answers

  Consider the eer diagram for a car dealer

Consider the EER diagram for a car dealer in the figure below. Map the EER schema into a set of relations. For the VEHICLE to CAR/ TRUCK/ SUV generalization.

  Assignment of database design

Create a data dictionary that includes the following: a. A description of the content for each field b. The data type of each field ac. The format the data will be stored as in the field d. The range of value for the field e. A label, as required, i..

  Object-oriented databases

Object-oriented databases, Write a paper that describes the topic in detail. Include descriptions covering the following subject areas

  Normalize the following table

Normalize the following table upto and including the 3NF. Submit a 1 page printout of only the final set of normalized tables in Data Architect. Just use Data Architect to do the tables. No need for E-R, mapping, relationships etc. Just tables. State..

  Why are labor operations and labor types often tracked in

Why are labor operations and labor types often tracked in the conversion process but usually not tracked in the revenue process?

  Find three different standards practices from entities

Find at least 3 different standards / best practices from entities that you consider authoritative in this field for both Server and Database securing and hardening (that is 6 standards in total).

  Advantages of a database management to file processing

How will wireless information appliances and services affect the business use of the Internet and the Web? Explain.

  Kinds of joins

It is not uncommon to have to access the data which reside in different tables, especially when formulating a report.

  What are the primary entity relationship modeling

What are the primary entity relationship modeling and design conventions used for Oracle Database Management Systems

  Database for university keep track of its course offerings

Assume you are making a database to help university keep track of its course offerings. You might have following entities in database, as they are distinct items in real life.

  Data storage and compression

Data Storage and Compression- Imagine that you are serving in the role of director of data center operations for your company, which is currently using redundant sites as backup and manually managing replication and failovers

  What are the major business objectives

What are the major business objectives and processes that the airline company carries out and list the information systems and subsystems that are used to support their portal and describe how they are related to the overall business objectives and..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd