Question 1: Write the following query in SQL: “Find (all) the celebrities with the most followers.” You should print the name of each celebrity and the corresponding number of followers. Note there may be more than one celebrity with the same number of followers. Question 2: Translate the following query into one English sentence: SELECT NAME FROM user WHERE email IN (SELECT email FROM celebrity WHERE email NOT IN (SELECT email FROM blurt
Write SQL queries for the
user (email, password, name, date_of_birth, address, type)
celebrity (email, website, kind)
blurt (blurtid, email, text, location, time)
foreign key(email) references user(email)
hobby (email, hobby)
follow (follower,followee)
vendor (id, name)
vendor_ambassador (vendorid, email)
topic (id, description)
vendor_topics (vendorid,topicid)
blurt_analysis (email,blurtid,topicid,confidence,sentiment)
advertisement (id, content, vendorid)
user_ad (email,adid)
Question 1:
Write the following query in SQL: “Find (all) the celebrities with the most followers.” You should print the name of each celebrity and the corresponding number of followers. Note there may be more than one celebrity with the same number of followers.
Question 2:
Translate the following query into one English sentence:
SELECT NAME FROM user
WHERE email IN (SELECT email FROM celebrity WHERE email NOT IN (SELECT email FROM blurt))
Step by step
Solved in 3 steps with 2 images