<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eunice Sashq</title>
    <description>The latest articles on DEV Community by Eunice Sashq (@eunice_sashq_3b39bf78916c).</description>
    <link>https://dev.to/eunice_sashq_3b39bf78916c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4208964%2F95770ac7-913b-4c6d-ba74-1f406fa33c8f.png</url>
      <title>DEV Community: Eunice Sashq</title>
      <link>https://dev.to/eunice_sashq_3b39bf78916c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eunice_sashq_3b39bf78916c"/>
    <language>en</language>
    <item>
      <title>SQL OPERATOR WEEK 2 21ST-22ND NOVEMBER</title>
      <dc:creator>Eunice Sashq</dc:creator>
      <pubDate>Wed, 28 Oct 2026 19:10:38 +0000</pubDate>
      <link>https://dev.to/eunice_sashq_3b39bf78916c/sql-operator-week-2-21st-22nd-november-3of7</link>
      <guid>https://dev.to/eunice_sashq_3b39bf78916c/sql-operator-week-2-21st-22nd-november-3of7</guid>
      <description>&lt;p&gt;SQL (Structured Query Language) allows communication with databases to facilitate easy extraction and manipulation of data. Data Query Language (DQL) is a sublanguage in SQL that lets us filter, organize, and retrieve specific data based on a given condition. The SELECT keyword forms the foundation of querying and data extraction. When using SELECT, we are not creating new tables; we are just temporarily retrieving read-only data based on requested results.&lt;br&gt;
Basic query syntax is: &lt;br&gt;
​The FROM keyword always specifies which table to query.&lt;br&gt;&lt;br&gt;
​SELECT * retrieves data from all available columns in the table.&lt;br&gt;&lt;br&gt;
​LIMIT restricts the number of rows returned by a query.&lt;br&gt;
Filtering &amp;amp; Operators&lt;br&gt;
​The WHERE clause is used to retrieve data conditionally and filter data where a specific condition is met or true.&lt;br&gt;&lt;br&gt;
​It is used alongside comparison operators to determine whether a condition is true or false:&lt;br&gt;&lt;br&gt;
​Equals (=)&lt;br&gt;&lt;br&gt;
​Not equal to (&amp;lt;&amp;gt; or !=)&lt;br&gt;&lt;br&gt;
​Less than (&amp;lt;)&lt;br&gt;&lt;br&gt;
​Greater than (&amp;gt;)&lt;br&gt;&lt;br&gt;
​Less than or equal to (&amp;lt;=)&lt;br&gt;&lt;br&gt;
​Greater than or equal to (&amp;gt;=)&lt;br&gt;
Removing Duplicates&lt;br&gt;
​SELECT DISTINCT eliminates rows where data is duplicated or exact duplicates exist.&lt;br&gt;&lt;br&gt;
​It does not change the original table in the database; it only affects the query results by returning unique values.&lt;br&gt;
​Aliasing uses the AS keyword to temporarily rename a table or column in a query for easy readability and simplification.&lt;br&gt;&lt;br&gt;
​Syntax: SELECT col_name AS new_col_name FROM db.table;.&lt;br&gt;&lt;br&gt;
​Always use descriptive names while aliasing&lt;br&gt;
To save query results in the database without interfering with the original dataset, we create a new table first, then insert the query results into it.&lt;br&gt;
Example:&lt;br&gt;
CREATE TABLE No_Duplicates (name VARCHAR, age INT);&lt;br&gt;
SELECT DISTINCT name, age FROM company.employees;&lt;br&gt;
INSERT INTO No_Duplicates (name, age);&lt;br&gt;
Combining Conditions with Logical Operators (AND, OR, NOT)&lt;br&gt;
​Often, a single condition isn't specific enough. This is where logical operators come in:&lt;br&gt;&lt;br&gt;
​AND-Returns records only if all conditions separated by AND are true.&lt;br&gt;
​OR- Returns records if at least one of the conditions is true.&lt;br&gt;
​NOT- Reverses the result of the condition (excludes matches).&lt;br&gt;
Working with Ranges and Lists (BETWEEN and IN)&lt;br&gt;
​Writing multiple OR statements can make your queries messy. SQL provides cleaner shorthand tools for ranges and lists:&lt;br&gt;&lt;br&gt;
​BETWEEN-Filters data within a specific range (inclusive of the boundary values).&lt;br&gt;
​IN- Checks if a column matches any value inside a specified list.&lt;br&gt;
Dealing with Missing Data (IS NULL and IS NOT NULL)&lt;br&gt;
​In data science and database administration, missing or incomplete data is a daily hurdle. In SQL, missing data is represented by NULL.&lt;br&gt;
​You cannot use standard comparison operators like = to find NULL values (more on that in the mistakes section!). Instead, you must use IS NULL or IS NOT NULL.&lt;br&gt;
Text Pattern Matching with LIKE&lt;br&gt;
​Exact matches are helpful, but what if you only remember part of a patient's name or a drug code? The LIKE operator allows you to search for patterns using wildcards:&lt;br&gt;&lt;br&gt;
​% represents zero, one, or multiple characters.&lt;br&gt;
​_ represents a single character.&lt;br&gt;
Common Mistakes to Avoid&lt;br&gt;
​Every beginner runs into these roadblocks when starting out with SQL filtering. Keep these in mind to save yourself hours of debugging:&lt;br&gt;&lt;br&gt;
i)​Using = NULL instead of IS NULL: Because NULL represents the absence of a value, writing WHERE column = NULL will always evaluate to unknown and return zero rows. Always use IS NULL or IS NOT NULL.&lt;br&gt;&lt;br&gt;
​&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>datascience</category>
      <category>postgres</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
