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
2 months agoSophia
27 days agoAdelina
28 days agoGail
1 months agoLettie
2 months agoFletcher
2 months agoNovella
2 months agoTamra
2 months agoQueenie
29 days agoNidia
2 months agoAlida
2 months agoKallie
2 months agoEleonora
1 months agoRenato
2 months agoCammy
2 months agoBecky
2 months agoElizabeth
2 months agoTresa
3 months agoChuck
2 months agoTamesha
2 months agoHarley
2 months agoBecky
3 months agoShenika
3 months agoAnika
2 months agoChauncey
2 months agoLuisa
2 months agoMirta
3 months agoOliva
3 months agoKarina
3 months agoMarkus
3 months ago