Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAMPLE BY breaks with last(timestamp) #4501

Closed
1 task done
nwoolmer opened this issue May 14, 2024 · 0 comments · Fixed by #4503
Closed
1 task done

SAMPLE BY breaks with last(timestamp) #4501

nwoolmer opened this issue May 14, 2024 · 0 comments · Fixed by #4503
Assignees
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution

Comments

@nwoolmer
Copy link
Contributor

nwoolmer commented May 14, 2024

To reproduce

-- 717 rows
select timestamp, symbol,  first(price) as open, last(price) as close, max(price) as high, min(price) as low, sum(amount) AS volume
from trades w where timestamp > dateadd('d', -1, now()) sample by 1h;

-- 771,098 rows
select timestamp, symbol,  first(price) as open, last(price) as close, max(price) as high, min(price) as low, sum(amount) AS volume, last(timestamp) as last_timestamp
from trades w where timestamp > dateadd('d', -1, now()) sample by 1h;

Similar to: #4315

QuestDB version:

7.4.2

OS, in case of Docker specify Docker and the Host OS:

Demo

File System, in case of Docker specify Host File System:

ext4

Full Name:

Nick Woolmer

Affiliation:

QuestDB

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?

  • Yes, I have

Additional context

No response

@nwoolmer nwoolmer added Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution labels May 14, 2024
@nwoolmer nwoolmer changed the title SAMPLE BY breaks with last(timestamp SAMPLE BY breaks with last(timestamp) May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Incorrect or unexpected behavior SQL Issues or changes relating to SQL execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants