Free cookie consent management tool by TermsFeed Policy Generator
  • Azure SQL Video
  •    1 page views
  •   90 video views
  • 2024, February 12, Monday

[Lesson 03] Azure SQL Server Foundation for Business Analyst course

This free course is ideal for business analysts, and professionals looking to leverage the capabilities of Azure SQL Server to drive business intelligence and data-driven decision-making

Filter Values by Data Type Text:

  • When you want to filter values in a database based on a textual data type, you use conditions that take into account the contents of the columns. For example, when searching for all records in a table where the "Name" column equals "Mary," we're filtering values by a textual data type. The SQL language allows the use of clauses such as WHERE Name = 'Mary' to perform this type of filter.

Filter Values by Numeric Data Type:

  • When the goal is to filter values based on numeric data types, the conditions consider numeric values instead of text. For example, to fetch all records where the "Age" column is greater than 30, the query might include the WHERE clause Age > 30. This approach is effective for performing filtering based on numerical operations.
Filter Values by

Range of Values:

  • Filtering values by range allows you to retrieve records that are within a certain numeric, date, or alphanumeric range. For example, to get all sales with values between $100 and $500, the query could be constructed with the WHERE clause Value BETWEEN 100 AND 500. This provides flexibility when retrieving data that is within a specific range.

Examples:

-- Filter by Data Type Text
SELECT * FROM Customers WHERE City = 'New York';

-- Filter by Numeric Data Type
SELECT * FROM Products WHERE Price > 50;

-- Filter by Range of Values
SELECT * FROM Sales WHERE Value BETWEEN 1000 AND 5000;

These are basic examples of how to use WHERE clauses in SQL queries to filter values based on textual and numeric data types and specific ranges.

This content contains
  • Content Video
  • Language Portuguese
  • Duration 9m 31s
  • Subtitles Não

  • Reading time 1 min 19 seg

avatar
Fabio Santos

Data Scientist and Consultant for Digital and Analytics Solutions


  • Share

Youtube Channel

@fabioms

Subscribe now