Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create SQL queries (postgreSQL), the entities could be change if necessary or it makes the queries easier to be implemented: List all instructors who has

Create SQL queries (postgreSQL), the entities could be change if necessary or it makes the queries easier to be implemented:

  • List all instructors who has given more than a specific number of lessons during the current month.
  • Sum all lessons, independent of type.
  • Also list the three instructors having given most lessons (independent of lesson type) during the last month, sorted by number of given lessons.
  • The queries will be used to find instructors risking to work too much, and will be executed daily.

The following query should be performed programmatically:

  • List all ensembles held during the next week, sorted by music genre and weekday. For each ensemble tell whether it's full booked, has 1-2 seats left or has more seats left.

image text in transcribed

individual_lesson individual_lesson_id SERIAL NOT NULL student_id SERIAL NOT NULL (FK) in strument VARCHAR (100) level VARCHAR (100) start_time TIMESTAMP (10) end_time TIMESTAMP (10) employment_id SERIAL NOT NULL (FK) group_lesson group_lesson_id SERIAL NOT NULL nr_of_places INT min_nr_of_student INT instrument VARCHAR (100) level VARCHAR (10) start_time TIMESTAMP (10) end_time TIMESTAMP (10) employment_id SERIAL NOT NULL (FK) couldBe ensemble group_lesson_id SERIAL NOT NULL (FK) teaches teaches genre VARCHAR (100) TT instructor VARCHAR (100) instructor Hemployment_id SERIAL NOT NULL VARCHAR (9) NOT NULL (FK) ssh individual_lesson individual_lesson_id SERIAL NOT NULL student_id SERIAL NOT NULL (FK) in strument VARCHAR (100) level VARCHAR (100) start_time TIMESTAMP (10) end_time TIMESTAMP (10) employment_id SERIAL NOT NULL (FK) group_lesson group_lesson_id SERIAL NOT NULL nr_of_places INT min_nr_of_student INT instrument VARCHAR (100) level VARCHAR (10) start_time TIMESTAMP (10) end_time TIMESTAMP (10) employment_id SERIAL NOT NULL (FK) couldBe ensemble group_lesson_id SERIAL NOT NULL (FK) teaches teaches genre VARCHAR (100) TT instructor VARCHAR (100) instructor Hemployment_id SERIAL NOT NULL VARCHAR (9) NOT NULL (FK) ssh

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

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago