@@ -32,77 +32,8 @@ The package currently only supports pandas but there are plans to support dask a
3232rapids in the future.
3333
3434## SQL Syntax
35- The sql syntax for dataframe_sql is as follows:
35+ The SQL syntax for dataframe_sql is exactly the same as the syntax in * sql_to_ibis* ,
36+ its underlying package:
3637
37- Select statement:
38+ You can see the full SQL syntax [ here ] ( https://github.com/zbrookle/sql_to_ibis )
3839
39- ``` SQL
40- SELECT [{ ALL | DISTINCT }]
41- { [ < expression> ] | < expression> [ [ AS ] < alias> ] } [, ...]
42- [ FROM < from_item> [, ...] ]
43- [ WHERE < bool_expression> ]
44- [ GROUP BY { < expression> [, ...] } ]
45- [ HAVING < bool_expression> ]
46- ```
47-
48- Set operations:
49-
50- ``` SQL
51- < select_statement1>
52- {UNION [DISTINCT] | UNION ALL | INTERSECT [DISTINCT] | EXCEPT [DISTINCT] | EXCEPT ALL}
53- < select_statment2>
54- ```
55-
56- Joins:
57-
58- ``` SQL
59- INNER, CROSS, FULL OUTER, LEFT OUTER, RIGHT OUTER, FULL, LEFT, RIGHT
60- ```
61-
62- Order by and limit:
63-
64- ``` SQL
65- < set >
66- [ORDER BY < expression> ]
67- [LIMIT < number > ]
68- ```
69-
70- Supported expressions and functions:
71- ``` SQL
72- + , - , * , /
73- ```
74- ``` SQL
75- CASE WHEN < condition> THEN < result> [WHEN ...] ELSE < result> END
76- ```
77- ``` SQL
78- SUM, AVG, MIN, MAX
79- ```
80- ``` SQL
81- {RANK | DENSE_RANK} OVER([PARTITION BY (< expresssion> [, < expression> ...)])
82- ```
83- ``` SQL
84- CAST (< expression> AS < data_type> )
85- ```
86- * Anything in <> is meant to be some string <br >
87- * Anything in [ ] is optional <br >
88- * Anything in {} is grouped together
89-
90- ### Supported Data Types for cast expressions include:
91- * VARCHAR, STRING
92- * INT16, SMALLINT
93- * INT32, INT
94- * INT64, BIGINT
95- * FLOAT16
96- * FLOAT32
97- * FLOAT, FLOAT64
98- * BOOL
99- * DATETIME64, TIMESTAMP
100- * CATEGORY
101- * OBJECT
102-
103- * Data types in dataframe SQL support many different name for certain datatypes becuase
104- popular SQL data types are not implemented with common names in pandas and other
105- dataframe frameworks
106- <br >
107- ** To make this less confusing all data types that are of the same size on the
108- backend are grouped together in this list
0 commit comments