ere all rows meet a criterion
Alas, my version won't let me use min() in a where clause - it only seems to
let me use it in the select clause. Is there a workaround?
mysql> select * from words where min(count) > 50 group by count;
ERROR : Invalid use of group function
d
Alas, my version won't let me use min() in a where clause - it only seems to
let me use it in the select clause. Is there a workaround?
mysql> select * from words where min(count) > 50 group by count;
ERROR : Invalid use of group function
d
On Tuesday 23 October 2001 8:17 am, Haapanen,
Hi Tom
I'm raring to try this out but whenever I try a "GROUP BY" on a select with a
join, I seem to get
ERROR : Invalid use of group function
E.g.
select * from words,pairs where words.word=pairs.word1 and pairs.word2=15451
and min(pairs.count/words.count) > 0.8 group by word2;
ERROR
David Hugh-Jones writes:
> The student table has an "average grade" column which shows that student's
> average grade last year. The "grades" table has a column for subject (e.g.
> English, Math) and a column for the grade achieved.
>
> Suppose I want to select all my students who have perfor
This might work ... but I don't have a suitable database to test with ...
select * from students,grades
where students.id=grades.id
and min(grades.grade - students.average_grade) > 0
group by students.id
Tom Haapanen
[EMAIL PROTECTED]
-Original Message-
From: David Hugh-Jones [mailt
Hi,
> SELECT * FROM students,grades WHERE students.ID=grades.ID AND grades.grade
>
> students.average_grade
>
> This doesn't work. It gets me all the occasions where a student has beaten
> his average. But I only want students who have never gone below their
> average! In other words, I want to s