Table name: T1, it has only one column.
I need the following output from the above base table by
using SQL query.
Answer Posted / kumarvijay
select decode(dept_id,1,1,2,2,0) "cnt" ,count(decode
from deps group by decode(dept_id,1,1,2,2,0);
|Is This Answer Correct ?||0 Yes||0 No|
how do you know if your mysql server is alive? : Sql dba
List the ways to get the count of records in a table?
what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba
what is an index? : Sql dba
How would you convert date into julian date format?
What are different types of statements supported by sql?
What is inner join in sql?
What is rowtype?
What is a nested table in word?
Is json a nosql?
What is pl sql in dbms?
Why stored procedures are faster than query?
What is rtm in testing?
Name the operator which is used in the query for pattern matching?
What is the main reason behind using an index?