Introduction to Databricks SQL
Kevin Barlow
Data Manager
SELECT
id,
name,
product,
store_id,
sales,
unit_price,
FROM
sales_data
WHERE
sales > 10 AND
product IN ('widget', 'thingy')
ROUND()
and FORMAT_NUMBER()
CONCAT()
, LEFT()
, and RIGHT()
DATE()
, DATE_ADD()
, and DATE_DIFF()
CASE
, IF()
, and ISNULL()
FROM_CSV()
and FROM_JSON()
SELECT
id,
initcap(name) as name,
right(product, 10) as productSKU,
store_id,
int(sales) as numSales,
round(unit_price, 2) as unit_price
FROM
sales_data
WHERE
sales > 10 AND
product IN ('widget', 'thingy')
Introduction to Databricks SQL