1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
valina [46]
3 years ago
10

Suppose you are given a relation emp(empid, dept, salary) and wish to maintain a materialized view deptsalary(dept, totalsalary)

which stores the total salary for all employees of each department. Suppose the system does not support materialized views but supports triggers. Write an SQL trigger on insert on emp to keep the relation deptsalary up to date. Do not worry about deletes or updates. You can assume that there is already a tuple for each department in deptsalary so you do not need to worry about new deparments.
Computers and Technology
1 answer:
NeX [460]3 years ago
7 0

Answer:

WITH deptsalary AS (

SELECT dept,  SUM(salary)

FROM emp

GROUP BY dept)

SELCT *

FROM deptsalary

Explanation:

deptsalary is temporary table.

dept and its respective sum of salary is to be displayed

You might be interested in
How were the pages made to create the Book of Kells? a. Scribes prepared the papers using a printing press. b. 185 calves were s
NeX [460]

Answer:

The answer is "Option b".

Explanation:

This is the book of the liturgical manuscript for the catholic churches, which is the four Scriptural texts now in Cambridge, Dublin, and Ireland. It is the job, which is known for the sophistication, accuracy, and elegance of that same paintings in the Classically illustrated scripts. It was been built between 800 AD by Celtic monks to build vellum 185 calves had been killed, and the incorrect option can be defined as follows:

  • In option a, This book is not used in the printing press.
  • In option c, This book is used in the liturgical manuscript.
7 0
3 years ago
7.5 code practice please I can't get a 100 on it helpppp :/
Shtirlitz [24]

Answer:

100-7.5=92.5

Explanation:

6 0
3 years ago
Read 2 more answers
Which statement accurately compares the restart at 1 and continue numbering featured of word
Andrews [41]

Answer: the continue numbering feature can be used to maintain the numbering order in a list and the restart at 1 feature can be used to make a new list

Explanation:

7 0
3 years ago
Read 2 more answers
What did research conducted in 2009 at Carnegie University Mellon predict?
riadik2000 [5.3K]

A.Information on social networking sites can give most or all digits of a person’s social security number.


5 0
3 years ago
Bill is pushing a box with 10 N of force to the left, while Alice is pushing the box with 30 N of force to the right. What is th
Greeley [361]

Answer:

Net force = 20 N

Explanation:

Given that,

Force acting on the left = 10 N

Force acting on the right = 30 N

Let right side is positive and left side is negative. Let the net force acting on the box is F. So,

F = -10+30

F = 20 N

So, the net force on the box is 20 N and it is in right side.

7 0
3 years ago
Other questions:
  • The statements that a programmer writes in a high-level language are called ________.
    9·2 answers
  • If 15 bits are sent in 3 seconds then Bits intervalis__________
    13·1 answer
  • An extranet is like an intranet except that it allows company employees access to corporate Web sites from the ______
    13·1 answer
  • What is 450 g of flour a measure of?
    11·1 answer
  • Write a statement that toggles the value of the bool variable onoffswitch. that is, if onoffswitch is false , its value is chang
    10·1 answer
  • A ___describes a particular attribute of the dates item in a table​
    14·1 answer
  • What resources can be shared over a computer network?
    12·2 answers
  • What is the python print of (“5”+”7”)?
    10·1 answer
  • Tara and Zach are leading a systems development project and they want the investigation phase to go smoothly and quickly. They d
    10·1 answer
  • I like the impact that the increasing number of social grants may have on the things mothers​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!