javascript - MySQL, Selecting the index based on MIN timestamp -


i trying index of row maximum timestamp. however, can't seem index. here's code:

client.query('select inde, min( stamp ) archive', function(err, result){         console.log(result); }); 

'stamp' timestamp column. above code return 1 index , timestamp. but, when switch min max, printed timestamp change max index remains same (it returns minimum index).

you're getting asked for. inde fields table, along overall global mininum records in table.

to record(s) associated minimum value, need more complicated query:

select * archive stamp = (select min(stamp) archive) 

Comments

Popular posts from this blog

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

c - sscanf() double showing zeros -