jteixeira Posted November 8, 2006 Share Posted November 8, 2006 How can I do a Max function in one count functions for obtain the max of count Link to comment Share on other sites More sharing options...
jteixeira Posted November 8, 2006 Author Share Posted November 8, 2006 Select NomeAvaria,Count(*) "Maquinas"From Avarias INNER JOIN DESCAvarias on DESCAvarias.TipoAvaria=Avarias.tipoGroup by NomeAvariaOrder by Count(*)I Want Make a MAX of this Query and i don't know how to do it Link to comment Share on other sites More sharing options...
justsomeguy Posted November 8, 2006 Share Posted November 8, 2006 Are you saying you want the highest count? If that's all you want, you can order the count descending, and then the first record will be the highest. Link to comment Share on other sites More sharing options...
pulpfiction Posted November 8, 2006 Share Posted November 8, 2006 Are you trying to list with "count(*)" in decending order. try thisSelect NomeAvaria, Count(*) as MaquinasFrom Avarias INNER JOIN DESCAvarias on DESCAvarias.TipoAvaria=Avarias.tipoGroup by NomeAvariaOrder by Maquinas DESC Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now