Skip to content

Conversation

nwoolmer
Copy link
Contributor

@nwoolmer nwoolmer commented Oct 1, 2025

Closes #170

Copy link

github-actions bot commented Oct 1, 2025

🚀 Build success!

Latest successful preview: https://preview-246--questdb-documentation.netlify.app/docs/

Commit SHA: 7c1b397

📦 Build generates a preview & updates link on each commit.

@nwoolmer nwoolmer marked this pull request as ready for review October 8, 2025 11:38
Copy link
Contributor

@javier javier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Left a few comments

You can work around this limitation by using CTEs or subqueries:

```questdb-sql
-- CTE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make this query demoable or is it too much in an info block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the demo tag, we can see how it looks

| :--------------- |
| 49.5442334742831 |

## mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, move before nsum to keep alphabetical order

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this originally too, but we don't respect alphabetical order - for example first/last is a single entry. I'm all in favour for splitting them and making them alphabetical though. Ideally we need a smarter sort by usage i.e. predicate aggregates (first/last/min/max) versus reducation aggregate (sum, avg etc.)

| A | alpha |
| B | beta |


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a demoable query? this one is nice

select symbol, mode(price)
from trades
where timestamp in today()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps mode(price) is not ideal, because of precision. Maybe mode(side) i.e. were there more buys and sells for each symbol?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add documentation for "Aggregate function cannot be passed as an argument" limitation
2 participants