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 / arunarevathi.s

hi seenu,
in this table have three coloumn thats are
book,version,numofbooks.
The query for u,
sql>select book,sum(numofbook)as count from book
group by book;


By,
aruna

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is table in a database?

704


What are the usages of sql?

661


What is sql indexing?

657


What is secondary key?

591


Can we create clustered index without primary key?

609






Why use subqueries instead of joins?

695


What is sql*loader?

668


Are sql connections encrypted?

657


what is the difference between join and union? : Sql dba

636


What does where 1 1 mean in sql?

641


How can we avoid duplicating records in a query?

667


Why function is used in sql?

606


What is the maximum number of rows in sql table?

655


can sql servers linked to other servers like oracle? : Sql dba

643


what is a view? : Sql dba

714