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
Answer / ajit
SELECT SUM(PRODQTY) FROM EMP WHERE TO_CHAR(PRODDATE,'MON-YYYY')='APR-2014';
Is This Answer Correct ? | 1 Yes | 0 No |
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 |
How does join work in sql?
What are advantages of Stored Procedures?
Can a foreign key be a duplicate?
What is the difference between cluster and non-cluster index?
What are the types of join in sql?
Why do we use subquery?
how to include character strings in sql statements? : Sql dba
What are the string functions in sql?
Can a foreign key have a different name?
What are different sql data types?
How do I save a stored procedure?
how to include comments in sql statements? : Sql dba