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 / suman maan

select substring(trade,1,(len(trade)-3)) as
trade,sum(no_ofbooks)
from test
group by substring(trade,1,(len(trade)-3))


Trade is bookname like(java1.1,.Net305)
no_ofbooks as indivisual book count

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between clustered and non-clustered indexes?

1093


what is a database? : Sql dba

1175


What operating systems are supported by oracle sql developer?

969


what are numeric data types? : Sql dba

1065


Can we use view in stored procedure?

903


What is the difference between inner join and left join?

990


Explain commit, rollback and savepoint.

1004


What is the purpose of my sql?

953


What is the difference between delete and truncate statement in sql?

1075


What is having clause in sql?

970


What is exception? What are the types of exceptions?

1073


Are stored procedures faster than queries?

948


Is there a way to automate sql execution from the command-line, batch job or shell script?

976


what is “go” in t-sql? : Transact sql

1108


What is vector point function?

1055