Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write any five (5) SQL queries of your own but you must include the use of joins and functions. Example of SQL queries are

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

1. Write any five (5) SQL queries of your own but you must include the use of joins and functions. Example of SQL queries are given below: a. Show all the year 1 students, waste disposal details, and reward points details. Show ONLY the student ID, student name, deposit ID, date, time, type, quantity, before and after reward points. b. Show all the product redemption details that have used up for more than 500 reward points between May 2022 and April 2022. Show ONLY the redemption ID, date, time, product redeemed, quantity, before and after reward points. c. Find the top TEN (10) students with the MOST number of recycled waste that were disposed (referring to the quantities of recycled items and not the number of deposits made) between May 2022 and April 2022. d. Based on the feedback evaluation forms, list all evaluation ID and its total score (by adding up the individual score in each of the evaluation categories) and sort these records in descending order. CREATE TABLE GardenCatalog ( ProductName varchar(25), Availability char(3), Quantity int, RequiredPoints int, PRIMARY KEY(ProductNo) ); CREATE TABLE Feedback ( FeedbackNo varchar(5) identity(F0001,1) not null, MatricNo int, CategoryNo varchar(2) not null, GivenScore int, PRIMARY KEY(FeedbackNo,CategoryNo), FOREIGN KEY(MatricNo) references Student(Matric No) )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+35-5 Discuss how smart thinkers use intuition.

Answered: 1 week ago