Click here to Skip to main content
15,443,175 members
Home / Discussions / Database
   

Database

 
GeneralRe: select year/month syntax (for contracts up for renewal in X month) Pin
Giri K19-Dec-07 11:55
MemberGiri K19-Dec-07 11:55 
Questionjoins of two tables +search Pin
regin18-Dec-07 1:42
Memberregin18-Dec-07 1:42 
GeneralRe: joins of two tables +search Pin
pmarfleet18-Dec-07 1:59
Memberpmarfleet18-Dec-07 1:59 
GeneralRe: joins of two tables +search Pin
andyharman18-Dec-07 3:47
professionalandyharman18-Dec-07 3:47 
QuestionHow to get generated Primary Key when adding a record Pin
gunner_uk200018-Dec-07 1:35
Membergunner_uk200018-Dec-07 1:35 
AnswerRe: How to get generated Primary Key when adding a record Pin
Pete O'Hanlon18-Dec-07 1:38
mvaPete O'Hanlon18-Dec-07 1:38 
AnswerRe: How to get generated Primary Key when adding a record Pin
Giorgi Dalakishvili18-Dec-07 1:42
mentorGiorgi Dalakishvili18-Dec-07 1:42 
Questionselect the max value from the row and its other values Pin
Deques18-Dec-07 1:19
MemberDeques18-Dec-07 1:19 
Here is the table
Project        	col1	col2	col3	col4
A        	151,46	80	0,29	2
A        	529,14	83	0,29	1
B        	3391,3	80	0	2
B        	3706,2	75	0,06	1
C        	8685,3	78	2,41	1
C        	9005,2	71	0	2


How do I get the max value for col1 for each project and its other values?

ie. project a's max value is 529,14. its others value is 80, 0.29 and 2
Project        	col1	col2	col3	col4
A        	529,14	83	0,29	1
B        	3706,2	75	0,06	1
C        	9005,2	71	0	2



I have this query, but it results everything, not only the max value for each project
select project, max(col1), col2, col3, col4 from out_pumptable group by project, col2, col3, col4

GeneralRe: select the max value from the row and its other values Pin
Tobias Schoenig18-Dec-07 1:41
MemberTobias Schoenig18-Dec-07 1:41 
GeneralRe: select the max value from the row and its other values Pin
Deques18-Dec-07 1:51
MemberDeques18-Dec-07 1:51 
GeneralRe: select the max value from the row and its other values Pin
Tobias Schoenig18-Dec-07 1:59
MemberTobias Schoenig18-Dec-07 1:59 
GeneralRe: select the max value from the row and its other values Pin
Deques18-Dec-07 2:05
MemberDeques18-Dec-07 2:05 
GeneralRe: select the max value from the row and its other values Pin
Tobias Schoenig18-Dec-07 2:10
MemberTobias Schoenig18-Dec-07 2:10 
GeneralRe: select the max value from the row and its other values Pin
Deques18-Dec-07 2:17
MemberDeques18-Dec-07 2:17 
GeneralRe: select the max value from the row and its other values Pin
Tobias Schoenig18-Dec-07 2:22
MemberTobias Schoenig18-Dec-07 2:22 
GeneralRe: select the max value from the row and its other values Pin
Deques18-Dec-07 2:31
MemberDeques18-Dec-07 2:31 
GeneralRe: select the max value from the row and its other values Pin
Tobias Schoenig18-Dec-07 2:32
MemberTobias Schoenig18-Dec-07 2:32 
GeneralRe: select the max value from the row and its other values Pin
Deques18-Dec-07 2:43
MemberDeques18-Dec-07 2:43 
GeneralRe: select the max value from the row and its other values Pin
Tobias Schoenig18-Dec-07 2:49
MemberTobias Schoenig18-Dec-07 2:49 
GeneralRe: select the max value from the row and its other values Pin
Deques18-Dec-07 2:53
MemberDeques18-Dec-07 2:53 
GeneralRe: select the max value from the row and its other values Pin
Rupert Todd19-Dec-07 9:36
MemberRupert Todd19-Dec-07 9:36 
Generalcalling a storedprocedure from a function in mysql Pin
sepel18-Dec-07 0:35
Membersepel18-Dec-07 0:35 
GeneralDatabase Timeout!!!! Pin
__yash__18-Dec-07 0:19
professional__yash__18-Dec-07 0:19 
GeneralRe: Database Timeout!!!! Pin
Pete O'Hanlon18-Dec-07 0:26
mvaPete O'Hanlon18-Dec-07 0:26 
GeneralRe: Database Timeout!!!! Pin
__yash__18-Dec-07 0:41
professional__yash__18-Dec-07 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.