Question: User ( UId , Username, Password, Profile, Brief, Joindate) Post ( Code , Title, Details, PublishDate, views, status, type) Comment ( UId, PostCode , Description,

User (UId, Username, Password, Profile, Brief, Joindate)

Post (Code, Title, Details, PublishDate, views, status, type)

Comment (UId, PostCode, Description, commentDate)

Write the corresponding SQL queries for the below questions

  1. For each post code, list the total number of comments it has.
  2. Find the post titles having more than 500 views.
  3. Find the post titles with no comments.
  4. Find the highest number of views and average number of views of posts.
  5. List the username and title of post and description of the comment he added.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!