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
How many types of triggers exist in pl/sql?
What is the difference between between and in condition operators?
What is the main difference between sql and pl/sql?
what is the use of set statement in tsql? : Transact sql
what are the 'mysql' command line arguments? : Sql dba
What is trigger in sql and its types?
What is meant by cursor in sql?
Can a key be both primary and foreign?
how to check server status with 'mysqladmin'? : Sql dba
Does user triggers have entry for trigger with compilation errors?
Why use stored procedures?
What are synonyms in sql?
What is sql query limit?
What is left join example?
How does sql*loader handles newline characters in a record? : aql loader