0% found this document useful (0 votes)
48 views1 page

Synapse Analytics SQL Pools

The Synapse Analytics SQL Pools Cheat Sheet provides essential T-SQL commands for querying and analyzing data in both Dedicated and Serverless SQL Pools. It includes common operations such as SELECT, JOIN, and CREATE TABLE, along with specific functionalities for each pool type. Additionally, it highlights the use of OPENROWSET for accessing data in the data lake without infrastructure provisioning.

Uploaded by

Keshav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views1 page

Synapse Analytics SQL Pools

The Synapse Analytics SQL Pools Cheat Sheet provides essential T-SQL commands for querying and analyzing data in both Dedicated and Serverless SQL Pools. It includes common operations such as SELECT, JOIN, and CREATE TABLE, along with specific functionalities for each pool type. Additionally, it highlights the use of OPENROWSET for accessing data in the data lake without infrastructure provisioning.

Uploaded by

Keshav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

**Synapse Analytics SQL Pools Cheat Sheet**

Purpose: Querying and analyzing data in Synapse Dedicated and Serverless SQL Pools.
Standard T-SQL syntax with some extensions.

Common Operations:
- **`SELECT`:** Retrieves data from tables.
- **`FROM`:** Specifies the table(s) to query.
- **`WHERE`:** Filters rows based on conditions.
- **`GROUP BY`:** Groups rows with the same values.
- **`HAVING`:** Filters groups based on conditions.
- **`ORDER BY`:** Sorts the result set.
- **`JOIN` (INNER, LEFT, RIGHT, FULL):** Combines rows from two or more tables.
- **`INSERT INTO`:** Adds new rows to a table.
- **`UPDATE`:** Modifies existing rows in a table.
- **`DELETE FROM`:** Removes rows from a table.
- **`CREATE TABLE`:** Defines a new table schema.
- **`ALTER TABLE`:** Modifies an existing table schema.
- **`DROP TABLE`:** Removes a table.
- **`CREATE VIEW`:** Creates a virtual table based on a query.

Synapse Specifics (Examples):


- **Dedicated SQL Pools:** Focus on performance for structured data warehousing.
Consider distribution strategies (Hash, Round-Robin, Replicate).
- **Serverless SQL Pools:** Query data in the data lake without provisioning
infrastructure. Use `OPENROWSET` to access files.
```sql
SELECT TOP 10 *
FROM OPENROWSET(
BULK 'https://<your_storage_account>.dfs.core.windows.net/data/sales/*.csv',
FORMAT = 'CSV',
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
) AS files;

You might also like