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

[Feature]: Have LTTB return all columns #810

Open
deanna-abrams opened this issue Sep 10, 2024 · 0 comments
Open

[Feature]: Have LTTB return all columns #810

deanna-abrams opened this issue Sep 10, 2024 · 0 comments
Labels
feature-request And area of analysis that could be made easier

Comments

@deanna-abrams
Copy link

What problem does the new feature solve?

LTTB is a very useful function that downsamples data. However, it only returns the time and the value from the downsampled rows. It would be very useful to have access to the values of other columns from the downsampled rows.

What does the feature do?

perhaps something like

SELECT
    grouping_column,
    (lttb_data).time,
    (lttb_data).value,
    (lttb_data).non_grouping_column_value
FROM (
    SELECT
      grouping_column,
      UNNEST(lttb(time, float_value, $<nPoints>)) AS lttb_data
    FROM hypertable
    GROUP BY grouping_column
)

Implementation challenges

No response

@deanna-abrams deanna-abrams added the feature-request And area of analysis that could be made easier label Sep 10, 2024
@jonatas jonatas transferred this issue from timescale/timescaledb Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request And area of analysis that could be made easier
Projects
None yet
Development

No branches or pull requests

1 participant