visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: selecting max(revenue) < 8411


By: FiatLink Belgium  Date: 19/12/2004 11:44:51  English  Points: 20 Status: Answered
Quality : Excellent
My query is producing multiple results and it's supposed to only produce a single line. I want to get the max revenue from bonus where revenue < 8411

select max(revenue) as rev
from bonus
group by rev
having rev < 8411

This produces every row in bonus where revenue < 8411, which can be a very large query; I only want the maximum value of rev < 8411.

How can that be done; I'm using mySQL 3.23.41

Thanx
By: Bernard Date: 19/12/2004 11:48:52 English  Type : Answer
this should work :

SELECT MAX(revenue)
FROM bonus
WHERE revenue < 8411
By: VGR Date: 19/12/2004 12:00:47 English  Type : Comment
absolutely

Lesson : try to stay simple ;-)

Do register to be able to answer

EContact
browser fav
page generated in 299.757960 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page