how to Update table Sales_summary with max(sales) data from
table sales_dataTable 1. sales_data table Table 2.
Sales_summary
Region sales Region sales
N 500 N 0
N 800 W 0
N 600
W 899
W 458
W 900
I want the Sales_summary After Update like this
Region Sales
N 800
W 900
Answer Posted / soma
Update Sales_summary set sales = s2.sales
From Sales_summary s1,
(
Select Region, max(sales) sales
From sales_data group by Region
)s2
where s1.Region = s2.Region;
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Explain the methods used to protect source code of pl/sql.
Does truncate release storage space?
What is the difference between a query and a report?
What is user defined functions?
Explain the rollback statement?
What is the difference between the sql*loader and import utilities? : aql loader
Why we use join in sql?
What is a record in a database?
Is it possible for a table to have more than one foreign key?
Explain the components of sql?
what are different types of collation sensitivity? : Sql dba
What is the mutating table and constraining table?
What is keys and its types?
what is a trigger in mysql? : Sql dba
What is union and union all keyword in sql?