Write SQL statements for the five queries: (a) Show the id and name of the feedback activity, and the id, short name, and full name of the course the feedback activity belongs to (across all feedback activities for your site). (b) Show the id, name, presentation, and type (numeric, textarea, textfield, etc.) for the feedback items for two of your feedback activities (specify these feedback activities in your query). (c) Show how many feedback activities are provided for your site. In the same query also show the number of courses that have feedback activities (e.g., there could be 5 activities across 2 courses for your site; The query is asking for two numbers.). (d) Present which of the users has provided feedback on which feedback activity. Show the name of the feedback activity and the first and last name of the user. Arrange the query results in the order of the feedback activity name, and then the user's last name. (e) Show the information about feedback items and the corresponding values for courses containing feedback activities. List the course full name, feedback name, feedback item name and the feedback value. Arrange the query results in the order of course’s full name, feedback name and then feedback’s item name.
Write SQL statements for the five queries:
(a)
Show the id and name of the feedback activity, and the id, short name, and full name of the course the feedback activity belongs to (across all feedback activities for your site).
(b)
Show the id, name, presentation, and type (numeric, textarea, textfield, etc.) for the feedback items for two of your feedback activities (specify these feedback activities in your query).
(c)
Show how many feedback activities are provided for your site. In the same query also show the number of courses that have feedback activities (e.g., there could be 5 activities across 2 courses for your site; The query is asking for two numbers.).
(d)
Present which of the users has provided feedback on which feedback activity. Show the name of the feedback activity and the first and last name of the user. Arrange the query results in the order of the feedback activity name, and then the user's last name.
(e)
Show the information about feedback items and the corresponding values for courses containing feedback activities. List the course full name, feedback name, feedback item name and the feedback value. Arrange the query results in the order of course’s full name, feedback name and then feedback’s item name.
Step by step
Solved in 3 steps