SQL Keywords

SQL Keywords

SELECT

Feb 23, 2026

·

5

min read

Category: Data Query Language (DQL)

Platform Support:

✅ Snowflake | ✅ BigQuery | ✅ Databricks

Description

The SELECT statement retrieves data from one or more tables in a database. It's the most fundamental and commonly used SQL command for querying data.

Syntax

SELECT column1, column2, ...
FROM table_name
[WHERE condition]
[GROUP BY column]
[HAVING condition]
[ORDER BY column]
[LIMIT n]

SELECT column1, column2, ...
FROM table_name
[WHERE condition]
[GROUP BY column]
[HAVING condition]
[ORDER BY column]
[LIMIT n]

SELECT column1, column2, ...
FROM table_name
[WHERE condition]
[GROUP BY column]
[HAVING condition]
[ORDER BY column]
[LIMIT n]

Platform-Specific Notes

Snowflake:

  • Supports LIMIT and TOP syntax

  • Case-insensitive by default

  • Supports QUALIFY clause for window function filtering

BigQuery:

  • Uses LIMIT (not TOP)

  • Requires backticks for reserved keywords

  • Supports QUALIFY clause

Databricks:

  • Supports both LIMIT and TOP

  • Case-insensitive by default

  • Does not support QUALIFY (use subquery instead)

Example 1: Basic SELECT

SELECT first_name, email, country
FROM customers
WHERE country = 'USA'

SELECT first_name, email, country
FROM customers
WHERE country = 'USA'

SELECT first_name, email, country
FROM customers
WHERE country = 'USA'

Sample Data (customers table):

id

first_name

email

country

1

John

john@email.com

USA

2

Maria

maria@email.com

Spain

3

Sarah

sarah@email.com

USA

4

Ahmed

ahmed@email.com

Egypt

Result:

first_name

email

country

John

john@email.com

USA

Sarah

sarah@email.com

USA

Example 2: SELECT with Aggregation

All Platforms:

SELECT 
    country,
    COUNT(*) as customer_count,
    COUNT(DISTINCT email) as unique_emails
FROM customers
GROUP BY country
ORDER BY customer_count DESC

SELECT 
    country,
    COUNT(*) as customer_count,
    COUNT(DISTINCT email) as unique_emails
FROM customers
GROUP BY country
ORDER BY customer_count DESC

SELECT 
    country,
    COUNT(*) as customer_count,
    COUNT(DISTINCT email) as unique_emails
FROM customers
GROUP BY country
ORDER BY customer_count DESC

Sample Data:

id

first_name

email

country

1

John

john@email.com

USA

2

Maria

maria@email.com

Spain

3

Sarah

sarah@email.com

USA

4

Bob

bob@email.com

USA

5

Carlos

carlos@email.com

Spain

Result:

country

customer_count

unique_emails

USA

3

3

Spain

2

2

Best Practices

  • Always specify column names explicitly rather than using SELECT * in production code

  • Use aliases for better readability

  • Add LIMIT for exploratory queries on large tables

  • Consider using QUALIFY (Snowflake/BigQuery) for filtering window functions

Interested to Learn More?
Try Out the Free 14-Days Trial

More Articles

decorative icon

Experience Analytics for the AI-Era

Start your 14-day trial today - it's free and no credit card needed

decorative icon

Experience Analytics for the AI-Era

Start your 14-day trial today - it's free and no credit card needed

decorative icon

Experience Analytics for the AI-Era

Start your 14-day trial today - it's free and no credit card needed

Copyright © 2026 Paradime Labs, Inc.

Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.

Copyright © 2026 Paradime Labs, Inc.

Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.

Copyright © 2026 Paradime Labs, Inc.

Made with ❤️ in San Francisco ・ London

*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.