Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write SQL DDL statements that implement the following queries. Find all CS students who live in Edinburg. Find all possible pairs (combinations) of students and

image text in transcribed

Write SQL DDL statements that implement the following queries.

  1. Find all CS students who live in Edinburg.
  2. Find all possible pairs (combinations) of students and professors.
  3. Find all possible pairs (combinations) of CS and CE students.
  4. Find identifiers of all courses taken by the student named Nathan.
  5. Find titles of all courses taken by the student named Nathan.
  6. Find course titles and professor names for courses taken by the student named Nathan.
  7. Find names of students who took a course taught by Artem.
  8. Find names of professors who taught a course.
  9. Find all CS and all IT students
  10. Find the total number of credits completed by student with id 101.
Consider the database instance shown in the following image. Student sid name address major 101 Nathan Edinburg CS 105 Hussein Edinburg IT 103 Jose McAllen CE 102 Wendy Mission CS 104 Maria Pharr CS 106 Mike Edinburg CE 107 Lily McAllen NULL Professor pid name department 201 Artem CS 203 John CS 202 Virgil MATH 204 Pearl CS 205 Christine CS 2 Course cid title credits area 4333 Database 3 DB 1201 Comp literacy INTRO 6333 Advanced Database 3 DB 6315 Applied Database DB 3326 Java 1370 CSI 4 INTRO 3 3 PL rall Transcript sid cid pid semester year grade 101 4333 201 Spring 2009 A 101 6333 201 Fall 2009 A 101 6315 201 Fall 2009 A 103 4333 203 Summer I 2010 B 102 4333 201 Fall 2009 A 103 3326 204 Spring 2008 A 104 1201 205 Fall 2009 B 104 1370 203 Summer II 2010 A 106 1201 205 Fall 2009 c 106 1370 203 Summer II 2010 C 105 3326 204 Spring 2001 A 105 6315 203 Fall 2008 A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

=+Identify trends in the social media industry

Answered: 1 week ago