Comments (7)
Thanks for doing the list!
We now have table
as of today!
And then I expect they'll be a long list of simple functions like stddev
etc.
Those could be PRQL functions rather than written in rust, since they'll generally transpile to `func(foo)‘
from prql.
I'm all for making them PRQL functions, easier to share across implementations.
from prql.
Yes agreed, I'll update it.
from prql.
Closing this till we get a full list which can put in the docs somewhere.
from prql.
OK — feel free to PR a partial list for the meantime, and if you have the prql code then awesome (re your screenshots on discord). Thanks @qorrect
from prql.
Ok will do, I'm hoping to provide a PR for the standard library below, and a bunch of queries for testing, I'm not sure the right place for them so I'll let you place them.
# Aggregate Functions
func min column = f"MIN({column})"
func max column = f"MAX({column})"
func sum column = f"SUM({column})"
func avg column = f"AVG({column})"
func stddev column = f"STDDEV({column})"
func average column = f"AVG({column})"
func count = f"COUNT(*)"
func count column = f"COUNT({column})"
func count_distinct column = f"COUNT(DISTINCT `{column}`)"
# Casting functions
func float column = f'CAST({column} AS FLOAT)'
func int column = f'CAST({column} AS INT)'
func string column = f'CAST({column} AS CHAR)'
func date column = f'CAST({column} AS DATE)'
func datetime column = f'CAST({column} AS DATETIME)'
func timestamp column = f'CAST({column} AS TIMESTAMP)'
func time column = f'CAST({column} AS TIME)'
func boolean column = f'CAST({column} AS BOOLEAN)'
func decimal column = f'CAST({column} AS DECIMAL)'
func double column = f'CAST({column} AS DOUBLE)'
from null
from prql.
That's great! We could add this to a file functions.pest
initially? I'm sure it'll move around but I'm very up for adding it and then we can build on it.
For the Casting — I though the plan for as
that we had in discord was good? So it would just be a single func, if you agree...
from prql.
Related Issues (20)
- Nightly tests failed
- Parentheses omitted from sql output in non-commutative operations HOT 8
- Nightly tests failed HOT 1
- Name of the type for UTF-8 encoded strings of textual data HOT 4
- Top with group on Postgres HOT 5
- `std.prql` module HOT 2
- Modules containing data (tables, relations) HOT 3
- Release plan for 0.11.1 HOT 2
- Nightly tests failed HOT 1
- Remove `std.prql_version` in favor of `std.prql.version` HOT 5
- Nightly tests failed HOT 4
- Grouping breaks `select * except` HOT 2
- Set up text "fixture" for CLI project tests
- Clickhouse DATETIME conversion invalid format HOT 4
- Zig tests started failing HOT 3
- The various exit status codes from `prqlc` HOT 2
- Python compiler needs a flag to return the full sequence of errors as json HOT 5
- Compiler panic with `sort` in inline join relation HOT 5
- Nightly tests failed HOT 1
- `**` operator (or something else) for `math.pow` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prql.