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 user in sql?

0 Answers  


Can we alter stored procedure?

0 Answers  


what is csv? : Sql dba

0 Answers  


What is cross join example?

0 Answers  


how can we submit a form without a submit button? : Sql dba

0 Answers  






Is sql better than access?

0 Answers  


How to perform a loop through all tables in pl/sql?

4 Answers   Evosys, MBT,


what are the types of subquery? : Sql dba

0 Answers  


What is a full join sql?

0 Answers  


Explain ttitle and btitle.

0 Answers  


Is trigger a stored procedure?

0 Answers  


How many subqueries can be nested in a statement?

0 Answers  


Categories