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 one table,in that table
(1)i have java1.1 version books are 2 and java1.5 version
books are 4.
(2).Net2.0 books are 3, .Net3.5 books are 2
(3)ABC1.6 books are 4, ABC2.0 books are 3.

Now i want output is like

Book Count

Java 6
.Net 5
ABC 7

For this i need sql query, please help me if anyone how to
get this result.

Thanks,
Seenu

Answer Posted / ravi

Hi Seenu,
Please find the Query below.

select rtrim(bk_nm,'0123456789.'),sum(bk_cnt) from books
group by rtrim(bk_nm,'0123456789.')

where bk_nm is the name of the books you wrote and bk_cnt
is their individual count. Run this Query and you'll get
your answer.

In case of doubts do feel free to ask.

Thanks,
Ravi Jha

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the execution plan in sql?

970


What is varchar data type in sql?

1006


What is an escape character in sql?

978


Does a join table need a primary key?

901


Is not equal in sql?

949


What are the query optimization techniques?

882


Explain the working of primary key?

1031


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1063


What are instead of triggers?

992


What are the disadvantages of not performing database normalization?

1091


Any attempt to navigate programmatically to disabled form in a call_form stack is allowed?

1038


Does access use sql?

964


Which are the different case manipulation functions in sql?

952


How does postgresql compare to oracle/db2/ms sql server/informix?

980


How to change the order of columns in Oracle SQL Plus ?

992