Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

102 Posts

Posted - 07/25/2014 :  07:13:13  Show Profile  Reply with Quote
Hello I have the below code but the result is not that i want
can you helo me please?
summenew2 = avg_bereich
FROM AMPPU_Alle_Fehlteile A
INNER JOIN (select Offline_date,Bereich,AVG(ARTPU1) AS avg_bereich FROM
AMPPU_Alle_Fehlteile group by Offline_date,Bereich,
YEAR(Offline_date), MONTH(Offline_date)) B
ON MONTH(A.Offline_date) = MONTH (B.Offline_date) and
YEAR(A.Offline_date) = YEAR(B.Offline_date) ;

Flowing Fount of Yak Knowledge

2780 Posts

Posted - 07/25/2014 :  09:29:39  Show Profile  Reply with Quote
To hello you with this, please post:

1. CREATE TABLE commands to create the tables for your query
2. INSERT INTO commands to populate the tables with test data
3. The results you are getting from your query when executed against these tables
4. The results you want.
Go to Top of Page

Almighty SQL Goddess

38200 Posts

Posted - 07/25/2014 :  12:31:21  Show Profile  Visit tkizer's Homepage  Reply with Quote

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000