I have a table name Table1 which contain columns Cust_no,
car_model, country, salesamt. The records are 101, Fiat,
India, 12345
2nd record is 102, Tata, USA, 98743 3rd record is 101,
indica, India, 65342 4th record is 103, Toyota, UK, 64522
5th record is 103, Maruti, USA, 98632 and so on.....
Now my question is write sql query which will give me
detail about the sum of sales amount in perticular country
Answers were Sorted based on User's Feedback
Answer / satty
select country,sum(salesamt) from table1 groupby country;
but if its primary key is cust-no, then it will show error
-803 try to insert duplicates in primary key value.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / raghu
select country,sum(salesamt) from table1 where country = ind;
Is This Answer Correct ? | 0 Yes | 1 No |
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
What is collection in db2 bind?
is it compulsory commitment control in journal?
What is the difference between db2 and oracle?
What is a recovery log?
what is check point and restart Logic ? why do we go for that ??
Could anyone clearly explain the diference between sub query and correlated sub query?
i have one file having 100 of records? i want to display it like 20 records in one column and 20 records in another column total 40 records per page ? how ?
What is the picture clause of the null indicator variable?
What parameters are used to control the free space in DB2?
What do you mean by NOT NULL? When will you use it?
What is error -818 in db2. where can you find the timestamp of the DBRM and the source code.( precompile puts the timestamp on dbrm and source code correct?)