Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an expression in SQL for each of the following queries: D. For every situation where student A likes student B,but we have no information

image text in transcribed

Write an expression in SQL for each of the following queries:

D. For every situation where student A likes student B,but we have no information about whom B likes (that is, B does not appear as an ID1 in the Likes table),return A and B's names and status. E. For each student A who likes student B where the two are not friends,but student B likes a different student C,For all such trios, return the name and grade of A, B, and C. F. Find the name and status of all students who are liked by more than one other student.

Students(ID, name, status) Grade History(ID,courselD, courseCredit, grade_point) Friend(ID1,ID2) Likes(ID1, ID2) Friend table represents unidirectional relationships i.e if id1 = 1510 and id2 = 1381 means 1510 friends with 1381 but not vice versa. Likes table represents unidirectional relationships i.e if id1 = 1689 and id2 = 1709 means 1689 Likes 1709 but not vice versa. The four years of undergraduate education are called: freshman, sophomore, junior, Senior. Students Friend Likes Grade History ID2 ID1 1381 1689 1689 1709 1709 1247| 1782 1247 1911 1782 1247 1468 1316 1641 1304 1316 ID name 1025 Rick 1101 Jerry 1247 Shaggy Rogers 1304 Winnie the Pooh 1316 Leonardo 1381 Charlie Brown and Snoopy 1468 Mickey Mouse 1501 Raphael 1510 Bugs Bunny 1641 Scooby-Doo 1661 Scrooge McDuck 1689 Homer J. Simpson 1709 Tom 1782 Doremon 1911 Homer J. Simpson 1934 Morty ID1 1510 1510 1689 1381 1709 1689 1782 1782 1782 1468 1468 1101 1247 1247 1911 1501 1316 1934 1304 1661 ID2 1709 1689 1709 1247 1468 1468 1304 1934 1501 1101 ID coursell courseCredit grade_point year semester 1025 CSE311L 0 0.00 2020 FALL 1025 CSE311 3 3.00 2020 FALL 1304 CSE311L 0 0.00 2020 FALL 1304 CSE311L 3 3.00 2020 FALL 1316 CSE3111 0 0.00 2020 FALL 1316 CSE311L 3 4.00 2020 FALL 1468 CSE311L 0 0.00 2020 FALL 1468 CSE3111 3 330 2020 FALL 1501 CSE311L 0 0.00 2020 FALL 1501 CSE3111 3 2.70 2020 FALL 1641 CSE311L 0 0.00 2020 FALL 1641 CSE3111 3 3.70 2020 FALL 1101 1501 1934 1025 1641 1641 1911 1501 1501 1934 1934 1304 1661 1025

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

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

EXPLAIN several common types of training for special pu rposes.

Answered: 1 week ago

Question

Define Leap year?

Answered: 1 week ago

Question

Prepare a short profile of Lucy Clifford ?

Answered: 1 week ago

Question

Prepare a short profile of Rosa parks?

Answered: 1 week ago

Question

Prepare a short profile of victor marie hugo ?

Answered: 1 week ago

Question

3. Would you say that effective teamwork saved their lives?

Answered: 1 week ago