Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hai All i have a one table namely Product,the table values are like thisEmpid Product Qty------------------q001 sandle 5q002 sandle 5q001 lux 10q004 margo 5......q00n n 19i want to find every day total no of products in each product,i have n(100000) number of Records in my tableplease Help me. i t is very urgentRegardsUmapathyUmapathy
Kristen
Test
22859 Posts
Posted - 2007-04-13 : 12:23:58
You mean something like this?SELECT Product, SUM(Qty) as TotalQtyFROM MyTableGROUP BY ProductKristen
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts
Posted - 2007-04-13 : 12:25:13
Every day total? Do you have date field in your table?
Select DateCol, Product, Sum(Qty)from ProductGroup by Datecol, Productorder by 1,2
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED"