LucidParody
04-22-2004, 12:21 AM
Hi, i have this query:
SELECT count( a.name ) AS cnt,
AVG( ( a.rank + ( 1.5 * a.ballots ) ) *
( ( LOG(b.powerrank) / 3 ) ) + cnt )
as total,
a.name,
a.school,
a.tourny,
a.rank,
a.side,
a.team,
a.ballots,
b.id,
b.year,
b.name,
b.powerrank
FROM atty a, tourny b
WHERE a.tourny=b.id
GROUP BY a.name
ORDER BY total DESC
I want to be able to use the value of cnt in that AVG formula, but it's telling me I can't. how would i do this?
tia.
SELECT count( a.name ) AS cnt,
AVG( ( a.rank + ( 1.5 * a.ballots ) ) *
( ( LOG(b.powerrank) / 3 ) ) + cnt )
as total,
a.name,
a.school,
a.tourny,
a.rank,
a.side,
a.team,
a.ballots,
b.id,
b.year,
b.name,
b.powerrank
FROM atty a, tourny b
WHERE a.tourny=b.id
GROUP BY a.name
ORDER BY total DESC
I want to be able to use the value of cnt in that AVG formula, but it's telling me I can't. how would i do this?
tia.
