Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

define clustering index.

0 Answers  


i have a table like this : Name ADDRESS Toto 123 ... Toto 456 ToTo 678 I would like to delete 2 last row...please tell me how to delete its

5 Answers   EDS,


wt is view ? wht r the restrictions for view ?

3 Answers   Verizon,


What is the database descriptor?

2 Answers  


Is db2 free?

0 Answers  


what is commit & rollback? When and where is used while compiling a cobol-db2 program?

2 Answers  


What is meant by repeatable read?

4 Answers  


Can we delete records from view?

0 Answers  


How will you delete duplicate records from a table?

7 Answers   Google,


I use CS and update a page. Will the lock be released after I am done with that page?

2 Answers  


What do you need to do before you do EXPLAIN ?

1 Answers  


How can you quickly find out the # of rows updated after an update statement?

0 Answers  


Categories