A business analyst has been asked to create a data entity/object called sales_by_employee. It should always stay up-to-date when new data are added to the sales table. The new entity should have the columns sales_person, which will be the name of the employee from the employees table, and sales, which will be all sales for that particular sales person. Both the sales table and the employees table have an employee_id column that is used to identify the sales person.
Which of the following code blocks will accomplish this task?
A)
B)
C)
D)
The SQL code provided in Option D is the correct way to create a view namedsales_by_employeethat will always stay up-to-date with the sales and employees tables. The code uses theCREATE OR REPLACE VIEWstatement to define a new view that joins the sales and employees tables on the employee_id column. It selects the employee_name as sales_person and all sales for each employee, ensuring that the data entity/object is always up-to-date when new data are added to these tables.
Truman
21 days agoGail
2 days agoLettie
11 days agoFletcher
24 days agoNovella
26 days agoTamra
1 months agoNidia
14 days agoAlida
15 days agoKallie
1 months agoRenato
12 days agoCammy
15 days agoBecky
1 months agoElizabeth
1 months agoTresa
2 months agoChuck
13 days agoTamesha
15 days agoHarley
29 days agoBecky
2 months agoShenika
2 months agoAnika
24 days agoChauncey
27 days agoLuisa
1 months agoMirta
2 months agoOliva
2 months agoKarina
2 months agoMarkus
2 months ago