• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem doing inner select with MySql  RSS feed

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code, can somoene tell me what I did wrong? Thanks in advance.
Select ProfitLoss, Name, DatePosition
FROM interestprofit
Where Security = '13508754'
And TraderName = 'CAN'
GROUP BY TraderName, Security
Having DatePosition IN (Select DatePosition FROM interestprofit WHERE DatePosition = MAX(DatePosition))
 
Author and ninkuma
Marshal
Posts: 66345
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

can somoene tell me what I did wrong?


Yes, you didn't tell us what the problem was.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haven't tried it but shouldn't it be:
 
bob morkos
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that would do it. Thanks

Originally posted by Jason Steele:
Haven't tried it but shouldn't it be:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!