You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new query language support for prql https://prql-lang.org, which allows writing queries in pipeline-like style. I tried a few queries in the playground, one impressive example is querying "the top 10 cities average billing info among the latest 100 records". It needs a CTE first to get the latest 100 records, and then calculate their average. But this CTE is hidden in prql:
from invoices
sort [-invoice_date]
take 100
group [billing_city] (
aggregate [
avg = average total
]
)
sort [-_frame.avg]
take 10
Generated SQL:
WITH table_1 AS (
SELECT
billing_city,
total
FROM
invoices
LIMIT100
)
SELECT
billing_city,
AVG(total) AS avg
FROM
table_1
GROUP BY
billing_city
ORDER BY
avg DESCLIMIT10
It also provides some short-hand time/date/interval annotations, we could also benefit from it.
What does the feature do?
Support prql language. It would not have many things to do as it provides an embedded compiler library that can compile prql to SQL. We only need to touch the parser IMO.
Implementation challenges
No response
The text was updated successfully, but these errors were encountered:
Thanks for your enthusiasm ❤️ This feature is still under discussion, and we wonder if it suits GreptimeDB. You could also comment to tell what you think about it
What problem does the new feature solve?
Add a new query language support for prql https://prql-lang.org, which allows writing queries in pipeline-like style. I tried a few queries in the playground, one impressive example is querying "the top 10 cities average billing info among the latest 100 records". It needs a CTE first to get the latest 100 records, and then calculate their average. But this CTE is hidden in prql:
Generated SQL:
It also provides some short-hand time/date/interval annotations, we could also benefit from it.
What does the feature do?
Support prql language. It would not have many things to do as it provides an embedded compiler library that can compile prql to SQL. We only need to touch the parser IMO.
Implementation challenges
No response
The text was updated successfully, but these errors were encountered: