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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can deadlocks be resolved?

890


List out the three types of page locks that can be held.

1093


What are the different types of base tables?

1029


What is bind plan?

980


How many databases can be created inside an instance in db2 ?

981


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

1093


What does db2 stand for?

961


What is deadlock in db2?

1021


What is innodb buffer pool?

982


What is a page in db2?

983


Which isolation level provides maximum concurrency?

1093


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

2011


What is scrollable cursor in db2?

999


How to execute stored procedure in db2 command editor?

986


How to rename a table in DB2 ?

1033