A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

AVG



 
 
Thread Tools Display Modes
  #1  
Old October 19th, 2007, 05:20 PM posted to microsoft.public.access.queries
Octet32
external usenet poster
 
Posts: 92
Default AVG

Im try to find out which stuents had a greater then avg grade how do i write
this?

I tryed the below no luck.

SELECT studentname
FROM students
WHERE grade = AVG (grade);

  #2  
Old October 19th, 2007, 05:35 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default AVG

Try these two queries ----
Grade_AVG ---
SELECT Avg(Students.grade) AS AvgOfgrade
FROM Students;

SELECT Students.StudentName, Students.grade
FROM Students, Grade_AVG
WHERE (((Students.grade)=[AvgOfgrade]));

--
KARL DEWEY
Build a little - Test a little


"Octet32" wrote:

Im try to find out which stuents had a greater then avg grade how do i write
this?

I tryed the below no luck.

SELECT studentname
FROM students
WHERE grade = AVG (grade);

  #3  
Old October 19th, 2007, 06:47 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default AVG

I would think that the following would give you the result you say you want.

SELECT StudentName
FROM Students
WHERE Students.Grade =
(SELECT Avg(Grade)
FROM Students)



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Octet32" wrote in message
news
Im try to find out which stuents had a greater then avg grade how do i
write
this?

I tryed the below no luck.

SELECT studentname
FROM students
WHERE grade = AVG (grade);



  #4  
Old October 19th, 2007, 06:54 PM posted to microsoft.public.access.queries
Octet32
external usenet poster
 
Posts: 92
Default AVG

Thanks

"John Spencer" wrote:

I would think that the following would give you the result you say you want.

SELECT StudentName
FROM Students
WHERE Students.Grade =
(SELECT Avg(Grade)
FROM Students)



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Octet32" wrote in message
news
Im try to find out which stuents had a greater then avg grade how do i
write
this?

I tryed the below no luck.

SELECT studentname
FROM students
WHERE grade = AVG (grade);




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.