Writing Errands

Download, unzip, and attach the sample database ITD640_B from the link below. The sample database represents a company with employees and different stores. Each employee works at just one store. The employees have various jobs in different promotional activities (promotions) and may work on more than one promotion at a time.Download the databaseThe following are the tables and data in the ITD640_B database:Using the sample database, write the scripts in a file called ITD640_P3.SQL to create the following views. Remember to include a USES clause at the top of your script file to use the ITD640_B database. Also include code that checks if the view already exists. If it does, it should be dropped and recreated.1.Create a view named v_stocker showing the employee number, promotion number, and start date where the job is “stocker.” 2.Create a view called v_no_budget with all the columns of the promotion table except the budget column. 3.Create a view called v_count that shows the number of employees that are working on each promotion. The view should have columns for the promotion number and the count.

× Chat on WhatsApp