How to use MySQL to solve this question? For each topic, find the total number o
ID: 3937641 • Letter: H
Question
How to use MySQL to solve this question?
For each topic, find the total number of blurts that were analyzed as being related to the topic. Order the result by topic id. Your SQL query should print the topic id, topic description and the corresponding count.
user (email, password, name, date_of _birth, address, type) primary keyemail) celebrity (email, website, kind) primary keyemail) blurt (blurtid, email, textlocation, time) primary keyblurtid,email ) foreign key (email) references user(email) hobby (email, hobby) primary key emailhobb, ) foreign key(email) references user(email) . follow (follower, followee) primary key(follower.followee) foreign key follower) references user(email) foreign keyfollowee) references user(email) vendor (id, name rimary keyid) vendorambassador (vendorid. email) primary keyvendorid) foreign key(email) references user email) foreign keyvendorid) references vendor(id) topic (id, description) primary keyid) vendor_topics (vendorid, topicid) primary keyvendorid, topicid) foreign keyvendorid) references vendor(id) foreign keytopicid) references topic(id)Explanation / Answer
select t.id,t.description,count(ba.blurtid) from Topic t,BlurtAnalysis ba where t.id=ba.topicid group by ba.topicid order by ba.topicid asc;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.