Jayden Ng Jayden Ng - 1 year ago 75
SQL Question

Query for a latest updateTime for specific user

I have a table that a user placing bets on


DB Table :
enter image description here

enter image description here

My Query :

select * from tbet where iUserKey=53298

How do I create a query that would give me the latest
iUserKey = 53298

Answer Source

Using MAX aggregate function

SELECT MAX(dUpdateTime) FROM tbet WHERE iUserKey = 53298 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download