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

What is the physical storage length of date data type?

1252


What db2 400?

1172


Can we delete records from view?

963


Define check constraint.

1074


What is universal database?

1066


Why do chiropractors use drop table?

1101


How does cobol compile db2 program?

1049


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

1080


Explain the function done by data manager?

1273


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

1158


Before you give the explain statement, what are the prerogatives?

1028


What is runstats db2?

1016


What is check constraint in db2?

1077


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

1101


If I have a view which is a join of two or more tables, can this view be updateable?

1139