Ask Your Question
2

What is the process for obtaining the timestamp of the day's highest quote in KDB?

asked 2023-01-03 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-05-07 06:00:00 +0000

huitzilopochtli gravatar image

Assuming you have a table with columns "timestamp" and "quote", you can use the following code to obtain the timestamp of the day's highest quote:

select max[quote], timestamp from table where date(timestamp) = today() 

This code will filter the table to only include rows with a timestamp on the current date (determined by today()), and then select the maximum quote value and corresponding timestamp using the max function.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-01-03 11:00:00 +0000

Seen: 12 times

Last updated: May 07 '21