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



I have a table name Table1 which contain columns Cust_no, car_model, country, salesamt. The record..

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

I have a table name Table1 which contain columns Cust_no, car_model, country, salesamt. The record..

Answer / raghu

select country,sum(salesamt) from table1 where country = ind;

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB2 Interview Questions

In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

0 Answers  


What is collection in db2 bind?

0 Answers  


is it compulsory commitment control in journal?

0 Answers   TCS,


What is the difference between db2 and oracle?

0 Answers  


What is a recovery log?

1 Answers  






what is check point and restart Logic ? why do we go for that ??

2 Answers   CGI, UST, Xansa,


Could anyone clearly explain the diference between sub query and correlated sub query?

3 Answers  


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 ?

2 Answers   EDS,


What is the picture clause of the null indicator variable?

6 Answers  


What parameters are used to control the free space in DB2?

0 Answers  


What do you mean by NOT NULL? When will you use it?

3 Answers  


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?)

2 Answers  


Categories