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
Post a Comment