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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is trigger price?

640


How would you reference column values before and after you have inserted and deleted triggers?

709


What if we write return in procedure?

872


What are the different types of sql commands?

689


What is the difference between a subquery and a join?

605






What is rowid in sql?

590


what is 'mysqlshow'? : Sql dba

672


Show code of a cursor for loop.

676


What is update query?

621


What is forward declaration in pl sql?

665


What are different functions in sql?

605


how to drop an existing table in mysql? : Sql dba

669


What is denormalization in a database?

671


Why do we use triggers?

620


How to return multiple rows from the stored procedure?

621