Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please I need help solving these SQL queries(How to write them): Questions List the serialNumber, brand, and size in inches for all bikes. List all

Please I need help solving these SQL queries(How to write them):

Questions

  1. List the serialNumber, brand, and size in inches for all bikes.

  2. List all room numbers used in course sessions (no duplicate values, order the result

  3. List the course numbers and date of all sessions that take place in room CC002.

  4. List the course numbers and date of all sessions that take place in room CC002 or CC005.

  5. List the participant ID and arrival date for all participants who have not finished volunteering yet.

  6. Find the lowest, highest, and average enrollment number among all course sessions.

  7. For each course, list the course number and count the number of sessions offered in August 2019

  8. For each participant, list the participant ID and last name and count the number of giveaways for each participant. Only include participants who received more than 1 giveaways.

  9. List all session ID, session date and times from courses with a capacity of 5.Use an IN + Subquery construct.

  10. List all participant ID and last names of participants who took a course that allows a capacity of 5. Use a series of nested IN + subquery clauses

  11. List all participants who did not enroll in a session of the course 'Brakes'. Use a type of Set difference operation (e.g., MINUS, NOT IN, NOT EXISTS)

  12. List all bikes with an above average volunteer time required.

  13. List all participants who received a giveaway bike before (not including) August 1st, 2018. Use a join.

  14. List the participants first and last name of all participants who enrolled in the course with the name 'Brakes' (do not provide a value for course number, use course name). Use joins.

  15. List the participant ID, last name, and giveaway date for all participants. If the participant has not received a giveaway bike, there should a null for giveaway_date.

  16. List all pairs of bikes that have the same condition. The result should contain three columns such that and have the same bike condition. A pair should appear only once in the output. (Tip: This is a self-join.)

  17. List all participants id, first, and last name who have not a giveaway. Use an anti join.

  18. List the participants who have not volunteered before August 15th, 2019 (Use NOT EXISTS).

  19. List the course numbers, name, and capacity of courses without enrollments. Use a MINUS operator

  20. List the bike name, bike brand, and the volunteer time required. Also indicate the time commitment level: 'High' if volunteer time required exceeds 30 hours, 'Middle' if volunteer time is between 20 and 30 (including 20 and 30), and 'Low' if volunteer time is below 20

  21. List the part_ID of all participants who volunteered. For each participant also also list the first date they volunteered and how long they volunteered on that date (participant who have not volunteered yet will not appear in your output). Use a correlated subquery.

  22. For the courses BRA, CBB, and TAT, list the course_number, number of sessions for the course, as well as the session ID and enrollment number (use a Windows Function)

  23. Create a Teaching Table. It has the following columns: teach_ID is the primary key and has datatype NUMBER (6), part_ID is the foreign key that links to the participant table, course_number is the foreign key that links to the course table, teaching_certificationDate has the Date type. Also write the corresponding DROP statement for the table teaching.

  24. Create an index on course session room number

  25. List the course numbers and numbers of sessions for each course. Include only courses with more than 5 sessions. Use a WITH clause.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions