Get latest N records for each different column value [duplicate]
This question already has answers here: Get top 1 row of each group (19 answers) Restrict results to top N rows per group (14 answers) Closed 2 days ago. I have a table that contains columns for ticker, date, and price. I would like to retrieve the latest N records for each ticker using SQL, […]
General (unsampled) aggregates and sampled one in the same query
I have a query with three aggregates
Funnel or Sankey diagram from flat events table
I am trying to build a user-flow or sankey diagram so I could find out what are the visited pages based on visitor_id or pathname. I would like to be able to see which pages contribute visits to others, and in which proportion. It would also be nice to have things like elapsed time, or number of pages in a single session for a user, or which are the entry and exit pages and so on, similar to web analytics tool.
Three aggregate functions, only one of them with conditions
I want to run three aggregations (max
, avg
, min
) in one questdb query, but the last of the aggregations should have a where
condition that does not affect the others.
Three aggregate functions, only one of them with conditions
I want to run three aggregations (max
, avg
, min
) in one questdb query, but the last of the aggregations should have a where
condition that does not affect the others.
I want to display a timestamp in my timezone, not UTC
I understand when I ingest data into QuestDB, the timestamps are always stored as UTC. This is all good, I get it, but I would like to see the timestamps in my local time zone. I live in Central Europe, my clock says right now it is 20:02, but if I do this
Plotting overlayed data from past week
I have this very simple query below. I can add it to my Grafana and plot a chart representing the activity in 1 hour intervals, and if I add a time filter, I can scope it to today. All good.
Get totals for top 5 elements in GROUP BY, and then the rest of the groups in a single total
I have a question. I have the following scheme
Remove outliers compared to recent data in my table
We have many UIs printing “Candle Stick Data” of trading pairs using our API and QuestDB. In some markets, there are very low volume trades which move the candle a lot (sometimes due to low liquidity and other factors).