subject

Consider the following relational schema, where the primary keys are Bold,
Students(sid, sname, address, dept_id)
Courses(cid, cname, dept_id)
Departments(dept_id, dname, college)
Grades(sid, cid, year, semester, grade)
Write the following queries in SQL. Only use the tables that are absolutely needed for the corresponding query.
1. Find the sids and snames of students who took "Database" course (i. e., cname = ā€˜Databaseā€™) in Fall 2019.
2. Find the average grade of all the students who took "CS327" (i. e., cid=ā€˜CS327ā€™) in Fall 2019. You can assume grade is a numerical attribute.
3. Find the number of distinct courses offered by each department in Fall 2019.
4. Find the sids of students who have taken at least 10 different courses offered by "Computer Science" department (i. e., dname = ā€˜Computer Scienceā€™).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
This question involves a class named textfile that represents a text file. public class textfile { private string filename; private string filename; private arraylist words; // constructors not shown // postcondition: returns the number of bytes in this file public int filesize() { } // precondition: 0 < = index < words.size() // postcondition: removes numwords words from the words arraylist beginning at // index. public void deletewords(int index, int numwords) { } // precondition: 0 < = index < = words.size() // postcondition: adds elements from newwords array to words arraylist beginning // at index. pub lic voidaddwords(int index, string[] newwords) { } // other methods not shown } complete the filesize() method. the filesize() is computed in bytes. in a text file, each character in each word counts as one byte. in addition, there is a space in between each word in the words arraylist, and each of those spaces also counts as one byte. for example, suppose the words arraylist stores the following words: { mary had a little lamb; its fleece was white as snow. } the filesize() method would compute 4 + 3 + 1 + 6 + 5 + 4 + 6 + 3 + 5 + 2 + 5 as the sum of the lengths of each string in the arraylist. the value returned would be this sum plus 10, because there would also be 10 spaces in between the 11 words. complete the filesize() method below: // postcondition: returns the number of bytes in this file public int filesize() { }
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
You know the right answer?
Consider the following relational schema, where the primary keys are Bold,
Students(sid, snam...
Questions
question
Mathematics, 13.02.2021 21:10
question
Engineering, 13.02.2021 21:10
question
Mathematics, 13.02.2021 21:10
question
Spanish, 13.02.2021 21:10
Questions on the website: 13722363