sql - Returning highest DATETIME from row with particular column data -


i trying select highest datetime specific request code:

enter image description here

this query i'm using:

select submittime    [qtraxadmin].[qt_request]   submittime in (select max(submittime)                          [qtraxadmin].[qt_request])         , requestcode = 'foreman';  

my issue query above returns nothing. think it's doing it's finding highest datetime in submittime column not belong foreman request code.

how can return latest submittime specific request code?

i think can select this, if of course times don't repeat within requestcode:

select max(submittime)   [qtraxadmin].[qt_request]  requestcode = 'foreman';  

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

html - href attribute breaking an element -