BlazingSQL

BlazingSQL Documentation

Welcome to our Documentation and Support Page!

BlazingSQL is a GPU accelerated SQL engine built on top of the RAPIDS data science framework. RAPIDS is a collection of open-source libraries for end-to-end data science pipelines entirely in the GPU. BlazingSQL extends RAPIDS and enables users to run SQL queries on Apache Arrow in GPU memory.

Please install, test, deploy, and gripe in our Discussion board.

Get Started    Discussions

General SQL

SELECT

Select

--Select All Columns
SELECT * FROM table_A

--Select Specific Columns 
SELECT column_A, column_B FROM table_A

WHERE

Query data and filter rows with a condition

--Single Filter
SELECT * FROM table_A WHERE column_A = 2

--Multiple Filters (AND)
SELECT * FROM table_A WHERE column_A > 2 AND column_A < 10

--Multiple Filters (OR)
SELECT * FROM table_A WHERE column_A < 2 OR column_A > 10

--Multiple Filters (AND/OR)
SELECT * FROM table_A WHERE (column_A < 2 OR column_A > 10) AND column_B = 3

Group By

Groups result set of a query by one or more columns

SUM

--SUM without GROUP BY
SELECT SUM(column_A) FROM table_A

--SUM with GROUP BY
SELECT SUM(column_A) FROM table_A GROUP BY column_B

AVERAGE (AVG)

--AVG without GROUP BY
SELECT AVG(column_A) FROM table_A

--AVG with GROUP BY
SELECT AVG(column_A) FROM table_A GROUP BY column_B

MIN

--MIN without GROUP BY
SELECT MIN(column_A) FROM table_A

--MIN with GROUP BY
SELECT MIN(column_A) FROM table_A GROUP BY column_B

MAX

--MAX without GROUP BY
SELECT MAX(column_A) FROM table_A

--MAX with GROUP BY
SELECT MAX(column_A) FROM table_A GROUP BY column_B

COUNT

--COUNT without GROUP BY
SELECT COUNT(column_A) FROM table_A

--COUNT with GROUP BY
SELECT COUNT(column_A) FROM table_A GROUP BY column_B

DISTINCT

--DISTINCT without GROUP BY
SELECT DISTINCT(column_A) FROM table_A

--DISTINCT with GROUP BY
SELECT DISTINCT(column_A) FROM table_A GROUP BY column_B

JOIN

Combine rows from two or more tables, based on a related column or columns between them

INNER

--INNER JOIN SINGLE COLUMN
SELECT table_A.column_A, table_B.column_A, table_B.column_C 
FROM table_A 
INNER JOIN table_B 
ON (table_A.column_A = table_B.column_B)

--INNER JOIN MULTI-COLUMN
SELECT table_A.column_A, table_B.column_A, table_B.column_C 
FROM table_A 
INNER JOIN table_B 
ON (table_A.column_A = table_B.column_B AND table_A.column_C = table_B.column_C)

FULL OUTER

--FULL OUTER JOIN SINGLE COLUMN
SELECT table_A.column_A, table_B.column_A, table_B.column_C 
FROM table_A 
FULL OUTER JOIN table_B 
ON (table_A.column_A = table_B.column_B)

--FULL OUTER JOIN MULTI-COLUMN
SELECT table_A.column_A, table_B.column_A, table_B.column_C 
FROM table_A 
FULL OUTER JOIN table_B 
ON (table_A.column_A = table_B.column_B AND table_A.column_C = table_B.column_C)

LEFT OUTER

--LEFT JOIN SINGLE COLUMN
SELECT table_A.column_A, table_B.column_A, table_B.column_C 
FROM table_A 
LEFT JOIN table_B 
ON (table_A.column_A = table_B.column_B)

--LEFT JOIN MULTI-COLUMN
SELECT table_A.column_A, table_B.column_A, table_B.column_C 
FROM table_A 
LEFT JOIN table_B 
ON (table_A.column_A = table_B.column_B AND table_A.column_C = table_B.column_C)

ORDER BY

Sorts the result-set in ascending or descending order

--ORDER BY without Specificying (defaults to Ascending)
SELECT column_A, column_B FROM table_A ORDER BY column_A

-- ORDER BY Specifying Ascending
SELECT column_A, column_B FROM table_A ORDER BY column_A ASC

-- ORDER BY Specifying Descending
SELECT column_A, column_B FROM table_A ORDER BY column_A DESC