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
For this i need sql query, please help me if anyone how to
get this result.
Answers were Sorted based on User's Feedback
Answer / ravi
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
In case of doubts do feel free to ask.
|Is This Answer Correct ?||8 Yes||0 No|
Answer / oraclecodec
There must be some column such as 'TECHNOLOGY' that should
distinguish java ,.net and ABC apart from their versions.
Then its easier to arrive at a solution
SELECT TECHNOLOGY,COUNT(*) FROM BOOK GROUP BY TECHNOLOGY;
|Is This Answer Correct ?||8 Yes||3 No|
Answer / arunarevathi.s
in this table have three coloumn thats are
The query for u,
sql>select book,sum(numofbook)as count from book
group by book;
|Is This Answer Correct ?||4 Yes||0 No|
Answer / suman maan
select substring(trade,1,(len(trade)-3)) as
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|
How does a trigger work?
What is pl sql variable?
Write the sql query using dual table for below output? 1 L R --- --- ---- 1 1 1 1 2 1 1 3 1 1 1 2 1 2 2 1 3 2 1 1 3 1 2 3 1 3 3 Write a query using only Dual table with out writing any pl/sql program.
Explain what is rdbms?
What are the datatypes a available in PL/SQL ?
How to read xml file in oracle pl sql?
What is difference between nchar and nvarchar?
What are the various levels of constraints?
What is the fastest way of accessing a row in a table?
Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?
How do you add a column to a table?
State the advatage and disadvantage of Cursor's?