table name: prod there are three fields in the table that are
1.proddate
2.prodQty
3.model
Day wise prodQty is stored in the table prod
write a query to display total prodqty in the year 2004 april.

Answers were Sorted based on User's Feedback



table name: prod there are three fields in the table that are 1.proddate 2.prodQty 3.model Day..

Answer / ajit

SELECT SUM(PRODQTY) FROM EMP WHERE TO_CHAR(PRODDATE,'MON-YYYY')='APR-2014';

Is This Answer Correct ?    1 Yes 0 No

table name: prod there are three fields in the table that are 1.proddate 2.prodQty 3.model Day..

Answer / sunnil

select sum(prodqty) from emp where to_char('proddate','yyyy')=2014 and to_char('proddate','mm')=04;

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SQL PLSQL Interview Questions

what is the difference between trigger and constraint?

3 Answers   HSBC,


Initially question was asked to mention the types of indexes. Then asked about BITMAP INDEX and B-Tree Index

2 Answers   Polaris,


What is pl/sql language case sensitive?

0 Answers  


What are the benefits of pl/sql packages?

0 Answers  


in a package one procedure is wrong package shows valid or not

4 Answers  






consider a table which contain 4 columns,ename,eno,sal and deptno, from this table i want to know ename who having maximum salary in deptno 10 and 20.

24 Answers   Mind Tree,


what is cursor. write example of it. What are the attributes of cursor.

0 Answers  


Difference between table function and pipelined function?

0 Answers  


Why are sql stored procedures used?

0 Answers  


How do you copy a table in sql?

0 Answers  


What is sql integrity?

0 Answers  


What is a sql driver?

0 Answers  


Categories