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

Define concurrency control. : Transact sql

0 Answers  


What are variables in pl sql?

0 Answers  


how to escape special characters in sql statements? : Sql dba

0 Answers  


Is left join and outer join same?

0 Answers  


Does sql require a server?

0 Answers  






What are different joins used in sql?

0 Answers  


How does one use sql*loader to load images, sound clips and documents? : aql loader

0 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


What is replication id?

0 Answers  


How many types of triggers exist in pl/sql?

0 Answers  


What is a sql statement?

0 Answers  


What is dml and ddl?

0 Answers  


Categories