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
Can you inner join the same table?
Which is better stored procedure or query?
How sql query is executed?
What is implicit cursor in pl sql?
what is a stored procedure? : Sql dba
How do you rename a table in sql?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
Explain mutating table error.
Is hadoop a nosql?
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
Explain what is a subquery ?
What are dml commands?
What is a sql statement?
what does the t-sql command ident_current does? : Transact sql
What is the process of copying data from table a to table b?