MySQL Query Language Please help!
For PHLogger users who are interested in the “alcoholism”
topic and have “wasted” thoughts about that topic, list their ids,
their names, and the start time of their most recent event. A
thought is defined as being “wasted” if its text contains the term
“wasted”, and an event is considered to be “recent” based on its
start time. Note that publishing thoughts into an interest group
doesn’t mean a user is interested in this group. A user has to
become a member of a certain interest group to be able to receive
the information he/she is interested in. Order your results by user
id.
Here are the attributes:
select User.phlid as Id, PHLogger.name as Name,
max(Event.start)
from User, About, Interest, Thought, PHLogger, Event
where
User.phlid = About.phlid and
About.iname = Interest.iname and
Interest.topic = 'alcoholism' and
User.phlid = Thought.phlid and
Thought.text = "wasted" and
User.phlid = PHLogger.phlid and
User.phlid = Event.phlid
order by Id;
MySQL Query Language Please help! For PHLogger users who are interested in the “alcoholism” topic and have “wasted” thoughts about that topic, list their ids, their names, and the start time of their...
MySQL Query Language Please help Find the ids of users who own at least one of every kind of observer. Note that a user can have multiple observers of the same type, and note also that new observers can be added at any time (so don’t use any constants in your query, e.g., do not assume static knowledge of the set of all possible observer kinds) Here are the attributes: tnum number observation_id PHLG obs observationid PHLogger address street address_state...
QUESTION: (Answer in SQL) Write an SQL query to find all pairs of users (A,B) such that both A and B have blurted on a common topic but A is not following B. Your query should print the names of A and B in that order. BACKGROUND INFO: Users can post their thoughts in form of short messages that we call “blurts”. When signing up, users need to provide their email and a password of their choice. In addition, they...