Someone please answer all of these. I need these badly. The submission date is knocking at the door.

Create table S(Sno int Primary Key, Sname varchar(20), Sgender varchar(6), Sage int, Sdepartment varchar(30));
Insert into S(Sno, Sname, Sgender, Sage, Sdepartment)
values(1,'Tom','Male',21,'ECE'),(2,'Mary','Female',20,'EEE'),(3,'John','Male',23,'ECE'),(4,'Rajesh','Male',21,'BioTech'),(5,'Niru','Female',21,'CSc');
Create table courses(Cno int Primary Key, Cname varchar(30), Cpno int, Ccredit int, Foreign Key (Cpno) References courses(Cno));
Insert into courses(Cno, Cname, Cpno, Ccredit)
Values(1, 'Data Structure', 2, 3),(2,'Database',3,4),(3,'Manual Testing',2,1),(4,'Automation Testing',3,5);
Create table Course(Sno int, Cno int, grade int, Foreign Key (Sno) References S(Sno), Foreign Key (Cno) References courses(Cno));
Insert into Course(Sno, Cno, grade)
values(1,1,25),(1,2,80),(3,3,87),(3,4,65),(4,2,75),(4,3,75),(5,3,81),(2,1,69),(1,3,80),(1,4,80),(3,1,87),(3,2,87) ;
/* 1 */
Select a.Sno as SID, a.Sname as 'Student Name' from S a, Course b Where a.Sno = b.Sno And Cno = 1;

/* 2*/
Select a.Sno as SID, a.Sname as 'Student Name'
From S a, Course b, courses c
Where a.Sno = b.Sno And b.Cno = c.Cno
And c.Cname = 'Data Structure';

/* 3 */
Select distinct a.Sno as SID, a.Sname as 'Student Name'
From S a, Course b
Where a.Sno = b.Sno
And Cno != 1;

/* 4 */
Select distinct a.Sno as SID, a.Sname as 'Student Name'
From S a, Course b
Where a.Sno = b.Sno
group by a.Sno, a.Sname
Having Count(*) = (Select Count(*) from courses);

/* 5 */
Select c.Sno, avg(c.grade) as 'Average Grade' from Course c,
(Select distinct a.Sno From S a, Course b Where a.Sno = b.Sno group by a.Sno, a.Sname Having Count(*) = (Select Count(*) from courses)) d
where c.Sno = d.Sno And c.Cno = 1 And c.grade < 35
group by c.Sno;

Someone please answer all of these. I need these badly. The submission date is knocking at...
Suppose that there are three relationships in a database: Student relationship: S(SNO, SNAME, AGE, GENDER, DEPT) Enroll relationship: SC(SNO, CNO, GRADE) Course relationship: C(CNO, CNAME) Here, the abbreviation and their full name correspond as: SNO Student Id number DEPT Student department SNAME Student name CNO Course number AGE Student age GRADE Course grade for certain student GENDER Student gender CNAME Course name Query the following in T-SQL format: Query the id number of the students who at least enrolled C2...
Consider the following database and answer the questions below. a) Write the SQL statement the displays the names of the students who have enrolled in the Database Systems course b) Write the SQL statement that displays a list of the students whose names start with 'S' c) Write the SQL statement that displays the Student ID, Student Name, Course ID, and Grade for students that passed at least one course with a grade better than B+ (i.e. A-, A, and...
4. The exams database: The following database contains multiple choice exam questions tables Questions and On Hons). Each question has a question Tert and each one of the options has and optid, which is an integer representing options A) (optid=1), B) (optid=2), C) (optid=3), etc. as well as the text of the option. The field correct is either Oor 1 and indicates which is the correct option for that particular question. courseThe exams have numbers 1, 2, 3, etc. Each...
Consider the following GRADEBOOK relational schema describing
the data for a grade
book of a particular instructor (Note: The attributes A, B, C,
and D store grade cutoffs.)
catalog(cno,ctitle)
students(sid,fname,lname,minit)
courses(term,secno,cno,A,B,C,D)
enrolls(sid,term,secno)
Specify and execute the following queries using the RA
interpreter on the GRADEBOOK
database schema.
a. Retrieve the names of students enrolled in the ‘Automata’
class in the term of Fall
1996.
b. Retrieve the SID values of students who have enrolled in
CSc226 as well as CSc227....
10- Specify the following
queries in SQL on the database schema of Figure 2. a. Retrieve the
names of all senior students majoring in ‘CS’ (Computer Science).
b. Retrieve the names of all courses taught by Professor King in
2004 and 2005. c. For each section taught by Professor King,
retrieve the course number, semester, year, and number of students
who took the section. d. Retrieve the name and transcript of each
senior student (Class =4) majoring in CS. A...
2. Consider the following database and answer the questions below SPORT ENROLLMENT STUDENT COURSE ST ST TITLE 313 1313 50s0 Basketbal 8989 Basketbal 007 COMP203A 7007 COMP20e 007 ames Bond 302 Database Systems COMP203 Computer Or n Brown 00 CoMP302 A o0 3un SmuCOMP42daedDatabase Systems 3 13 COMP 209 70 5050 Susan Smith COMP447 nced Database S 1313 COMP2O3A 1313 COMP302 5050 COMP20 C 1313 COMP42 7007 Write the SQL statement that displays the names of the students who have...
Find the courses taken by every student who has taken CSE132A.
Note that, if no student has taken CSE132A, then all courses should
be in the answer. Write the SQL query that uses only NOT EXISTS
tests on nested quieries
We will use the database schema from the SQL assignment: student sidcourse cid prerequisite cid pre.cid record sid cid qtr year grade Consider the following queries (from the SQL assignment): 2. Find the courses taken by every student who has...
Can someone please help me solve the following database management
question a - d please help
uestion-4 The relational database schema of Question-3 is reproduced here. COURSE (NUMBER, TITLE, ENROLLED) RANK-1 (CNUMBER, R1-SSN) RANK-2 (CNUMBER, R2-SSN) TALLEST (CNUMBER, TALL-SSN) STUDENT (SSN, NAME, MAJOR, SEX, GPA) Formulate the following queries in soL. (30] (a) List the course numbers in which "Jack Hernandez" is the first ranked student. You are not allowed to use any JOIN operation and your answer must be...
Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber , CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00. Enrollment = (SSN , CourseNumber, Grade) Express the following queries using SQL statements with minimum number of tables and operations. a. List the SSN and Name of every student who has no grade in at least one course. b. List the name of every student who enrolled in at least two courses....
SQL Homework Create a single script to do all of the following. Be sure to create in such a way that it can be re-run multiple times. Create a database named homework. In this database, create three tables: Student, Course, StudentCourse - Create the Student table with the following fields in this order: studentID as an integer; do not allow empty values firstName as a variable number of characters, max 30, with a null default value lastName as a variable...