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.
| Author |
Topic |
|
raj123
Starting Member
1 Post |
Posted - 2007-11-10 : 21:01:28
|
| hii am new to this sql server , i got a query which is very small.. how can we get the summary sales by yearthanks ,Raj |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2007-11-10 : 21:16:06
|
| You must be kidding right?With no sample data, column names, table names or actual desired results, all I can suggest is that you summarize the sales and group by the Year.Standard syntax might look likeSELECT Year(sale_Date) as [Year],SUM(sales) as [Sum of Sales]FROM SalesTableGroup by Year(Sale_Date)ORDER BY Year(Sale_Date) asc |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
arorarahul.0688
Posting Yak Master
125 Posts |
|
|
|
|
|